Edit

XML_Parse (expatParserHandle, xmlText, boolIsFinal)

Result type:  number (0 on error)

Definition:  Parses the XML in the string ``xmlText`. The Expat parser is a non-validating, 'event-based' parser. Event-based means it focuses on xml content, not on structure. XML data is analysed as a series of elements, and as each element is encountered, your startElement and endElement handlers will be called. You specify the names of your handlers using the XML_SetElementHandler and XML_SetCharacterDataHandler functions. Your charData handler will be called with any character data contained within element start and end Tags.

You may call XML_Parse multiple times with segments of the XML that you wish to parse. If supplying the complete XML text ir when calling with the final segment of XML, pass true for the boolIsFinal parameter, otherwise pass false if there will be more XML data to come.

Availability:  MWScript scripts in MoneyWorks Gold v8.1 and later

Suite:  This function is part of the Expat XML parsing suite of functions.

See Also:

XML_Free: Release an Expat parser

XML_ParserCreate: Create an Expat parser for parsing XML

XML_SetCharacterDataHandler: Set a character data Handler (callback) for an Expat parser

XML_SetElementHandler: Set an element Handler (callback) for an Expat parser