Category Feature element trees, Object ProElemtree

Function ProElemtreeFromXMLCreate


Description
Reads in the xml file and converts into an element tree. This element tree can be used as an input to ProFeatureWithoptionsCreate or ProFeatureWithoptionsRedefine
Replacement in Object TOOLKIT: wfcWSession::CreateElementTreeFromXML
Synopsis
#include <ProElement.h>
ProErrorProElemtreeFromXMLCreate(
ProPath xml_file
/* (In)
the name of the xml file with location this can be a relative or absolute path to the xml file or a URL ( http or file ) for the xml file
*/
ProElement* elemtree
/* (Out)
root element of the created element tree Memory allocated by the function and to be freed by caller using ProElementFree()
*/
ProXMLErrorlist** p_errors
/* (Out)
ProArray of errors. The memory allocated by the function has to be freed by using the function ProXmlerrorlistProarrayFree().
*/
)
Returns
PRO_TK_NO_ERRORSuccessful in creating the element tree
PRO_TK_BAD_INPUTSInvalid inputs
PRO_TK_GENERAL_ERRORErrors in the XML file; The function populates the ProArray p_errors to hold the errors ( refer all fields )
PRO_TK_OUT_OF_MEMORYXML Parser failed to initialize
PRO_TK_CANT_ACCESSXML Parser failed during parsing
PRO_TK_CANT_OPENXML Parser failed opening DOM Tree
PRO_TK_NOT_VALIDXML Parser failed due to other errors
PRO_TK_E_AMBIGUOUSError occurred during creation of output transcoder
PRO_TK_BAD_CONTEXTFunction failed to create the element tree due to an error in the ProElemId, ProType, or Enum Value in the XML file The function populates the ProArray p_errors to hold the errors ( refer to fields:
  • error_type = PRO_XML_OTHERERROR
  • line_number = sr. no. of Element in file
  • message = name of Element
  • column_number = elem_id of Element
)

Manual References:

  1. Element Trees: Principles of Feature Creation: Introduction to Feature Element Trees in XML
  2. Element Trees: Principles of Feature Creation: Introduction to Feature Element Trees in XML
  3. Element Trees: Principles of Feature Creation: Introduction to Feature Element Trees in XML
  4. Element Trees: Principles of Feature Creation: Validation Using XML Schema
  5. Element Trees: Principles of Feature Creation: XML Representations for Common Elements
  6. Element Trees: Principles of Feature Creation: Tips for Recycling XML Output of Element Trees