XmlParse

Converts an XML document that is represented as a string variable into an XML document object.

XmlParse( xmlString [, caseSensitive [, validator ] ] )

Returns: Xml

Argument Description
xmlString
string, required

Any of the following:

Alias: xmlStr, xmlText, xml

caseSensitive
boolean, optional

Maintains the case of document elements and attributes. Default: false

validator
string, optional

Any of the following:

  • A string containing a DTD or Schema
  • The name of a DTD or Schema file
  • The URL of a DTD or Schema file; valid protocol identifiers include http, https, ftp, and file

Examples

xml_stream = "
    <note>
      <to>Alice</to>
      <from>Bob</from>
      <heading>Reminder</heading>
      <body>Here is the message you requested.</body>
    </note>
  ";
  dump(XmlParse(xml_stream));

See also