
CHAPTER 9: Integrating XML into JavaScript XML Object Reference 246
XML Object Reference
This section provides reference details for the properties and methods of the XML object itself, and for the
related utility objects and global functions that you use to work with namespaces:
X “XML object” on page 246
X “Namespace object” on page 255
X “QName object” on page 255
X “Global functions” on page 254
XML object
The XML object provides both static properties and functions, available through the XML class, and dynamic
properties and functions available through each instance.
XML object constructor
The constructor returns the XML object representing the root node of an XML tree, which contains
additional
XML objects for all contained elements.
[new] XML (xmlCode);
XML class properties
These static properties are available through the XML class. They control how XML is parsed and generated:
xmlCode
String or XML A string containing valid XML code, or an existing XML object.
X If a valid string is supplied, returns a new XML object
encapsulating the XML code. If the XML code cannot be parsed,
throws a JavaScript error.
X If an existing object is supplied and the new operator is used,
returns a copy of the object; otherwise, returns the object itself.
ignoreComments
Boolean When true, comments are stripped from the XML
during parsing. Default is false.
ignoreProcessingInstructions
Boolean When true, processing instructions (<?xxx?>
elements) are stripped from the XML during
parsing. Default is false.
ignoreWhitespace
Boolean When true, white-space characters are stripped
from the XML during parsing. Default is true.
Comentários a estes Manuais