
CHAPTER 9: Integrating XML into JavaScript XML Object Reference 251
namespace()
xmlObj.namespace ();
Retrieves the namespace URI of this element.
Returns a String.
nodeKind()
xmlObj.nodeKind ();
Reports the type of this node.
Returns a String, one of:
element
attribute
comment
processing-instruction
text
namespaceDeclarations()
xmlObj.namespaceDeclarations ();
Retrieves all of the namespace declarations contained in this node.
Returns an Array of Namespace object
s.
normalize()
xmlObj.normalize ();
Puts all text nodes in this and all descendant XML objects into a normal form by merging adjacent
text nodes and eliminating empty text nodes.
Returns this XML object
.
parent()
xmlObj.parent ();
Retrieves the parent node of this node.
Returns an XML object
, or null for the root element.
prependChild()
xmlObj.prependChild (child);
child
An XML object or string.
Prepends a child element to this node, before any existing children. If you prepend a string to a text
element, the result is two text elements; call normalize()
to concatenate them into a single text
string.
Returns this XML object
.
Kommentare zu diesen Handbüchern