
CHAPTER 9: Integrating XML into JavaScript XML Object Reference 247
XML class functions
These static functions are available through the XML class, and provide information about the global
settings of the XML parser.
XML object properties
The properties of the XML object are named for and contain the values of the child elements and attributes
of the element that the object represents.
prettyIndent
Number The number of spaces to use for indenting when
pretty-printing. Default is 2.
prettyPrinting
Boolean When true, toXMLString() uses indenting and
line feeds to create the XML string. Default is true.
defaultSettings()
XML.defaultSettings ();
Retrieves the default global option settings that control how XML is parsed and generated.
Returns a JavaScript object containing five properties, which correspond to the five XML class
properties.
settings()
XML.settings ();
Retrieves the current global option settings that control how XML is parsed and generated.
Returns a JavaScript object containing five properties, which correspond to the five XML class
properties.
setSettings()
XML.setSettings (object);
object
A JavaScript object containing five properties, which correspond to the five XML class
properties.
Sets the global option settings that control how XML is parsed and generated. You can use this to
restore settings retrieved with settings()
or defaultSettings().
Returns
undefined.
childElementName
XML object Child-element properties are named with the child element
name.
@attributeName
XML object Attribute properties are named with the attribute name prefixed
with the at-sign,
@.
Comentarios a estos manuales