%XML_PARSER_PARSEFILE

Parse an XML file

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
document = %XML_PARSER_PARSEFILE(parser, filename)

Return value

document

The XML document instance created, or 0 if not successful. (XML_DOC_TYPE)

Arguments

parser

The parser instance. (XML_PARSER_TYPE)

filename

The name of the XML file to parse. (a)

Discussion

%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.

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.

See also

%XML_OPTION routine for information about escaping text or attribute values when calling %XML_PARSER_PARSEFILE

Examples

doc = %xml_parser_parsefile(dom, weather.xml)

Also see Example of parsing XML.