The standard event-driven XML parser.

void parse_xml(xml : string, events : object) The parse_xml parse a string and for each parsed element call the corresponding object method in events :
  • void xml( name : string, attribs : object) when an XML node is found
  • void done() when an XML node is closed
  • void pcdata(string) when PCData chars found
  • void cdata(string) when a CData session is found
  • void comment(string) when some comment or special header is found
You can then implement the events so they build the appropriate XML data structure needed by your language.

© 2019 Haxe Foundation | Contribute to this page