O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The XMLDOMText Object

The XMLDOMText object holds the text content of an element or attribute. If there is no markup inside an element but there is text, that element will contain only one node: a text node that holds the text. (In mixed-content models, text nodes can have sibling element nodes.)

When a document is first made available to the XML DOM, all text is normalized, which means that there is only one text node for each block of text. You can actually create text nodes that are adjacent to each other, although they will not be saved as distinct the next time the document is opened. (It's worth noting that the normalize method on the XMLDOMElement object merges adjacent text nodes into single nodes.)

Here are the base properties of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required