> Expat4D Home > Documentation > Command Reference

XML_ParserCreate ( {encoding} ) --> parserID


  • --> parserID : longint
  • --> startHandler : string[31]
  • --> endHandler : string[31]

Creates a new parser and returns the parserID if successful. The only thing which would stop this command working is if there is not enough memory to create the struct in RAM. In testing we found that our workshop process needed a 64k stack in order to run the plug-in with our test documents. Expat4D is fairly memory efficient so there really shouldn't be any problems here.

The encoding parameter can be left blank as it can be given in the XML document itself.

`Method: parseXML (text)

C_TEXT($1;$xmlText)
$xmlText:=$1

C_LONGINT($parser)
$parser:=xml_ParserCreate("")
xml_SetElementHandler($parser;"handler_startElement";"handler_endElement")

C_LONGINT($errorCode)
$errorCode:=xml_Parse($parser;$xmlText;1)
xml_ParserFree($parser)
   

See Also: xml_ParserCreateNS, xml_ParserFree

  Expat4D Logo

Developer Documentation

Creating Parsers, Destroying Parsers, Parsing Text

Configuring Handler Methods

Position and Error Reporting Functions

Miscellaneous Functions

Output Buffer Functions

Error Codes


> Expat4D Home > Documentation > Command Reference

Last Modified: 27th April 2001 at 9:00 PM