The CharacterData Interface

The CharacterData interface contains all the attributes and methods for accessing and editing the string portions of the interface, whether they are in text nodes, comment nodes, or any of the other nodes that take a string value.

The data Attribute

The data attribute will return all the text in the node as a Unicode string.

The length Attribute

The length attribute will return the number of characters in the string.

The subStringData() Method

This method will return a substring of the string in question. It takes two arguments, both unsigned long integers. The first argument is the offset parameter, which indicates the position of the start of the sub-string. The second argument is the count parameter, ...

Get XML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.