Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
document = %XML_PARSER_PARSEFILE(parser, filename)
The XML document instance created, or 0 if not successful. (XML_DOC_TYPE)
The parser instance. (XML_PARSER_TYPE)
The name of the XML file to parse. (a)
%XML_PARSER_PARSEFILE parses a well‑formed XML file and returns a new XML document instance. The created document can be processed using the %XML_DOC_xxx routines. The document can be deleted using %XML_DOC_DELETE.
The maximum length of a line in the XML file is 65,534 characters. If any line exceeds this limit, an error will occur.
If the XML data to be parsed is in memory (as an alpha string or referenced by a memory handle), call %XML_PARSER_PARSESTRING instead. (The data must first be converted to an XML string using the %XML_STRING_xxx routines.)
This function is defined as ^VAL.
%XML_OPTION for information about escaping text or attribute values when calling %XML_PARSER_PARSEFILE.
doc = %xml_parser_parsefile(dom, weather.xml)
Also see Example of parsing XML and, for an example of how to work around the 65,534 character limit, see PARSEXML.zip, available from the Synergy CodeExchange in the Resource Center on the Synergex website.