Extract the contents of a leaf XML node

DESCRIPTION:

Some types of XML nodes have no children nodes, but are leaf nodes and simply contain text. Examples are XMLTextMode, XMLProcessingInstruction. This function provides access to their raw contents. This has been extended to operate recursivel on arbitrary XML nodes that contain a single text node.

USAGE:

xmlValue(x, ignoreComments = FALSE)

ARGUMENTS:

x
the XMLNode object whose contents are to be returned.
ignoreComments
a logical value which, if TRUE does not include the text in XML comment nodes. If this is FALSE, the text in the comments is part of the return value.

VALUE:

The object stored in the value slot of the XMLNode object. This is typically a string.

AUTHOR(S):

Duncan Temple Lang

REFERENCES:

http://www.w3.org/XML, http://www.jclark.com/xml, http://www.omegahat.org

SEE ALSO:

EXAMPLES:

 node <- xmlNode("foo", "Some text")
 xmlValue(node)

 xmlValue(xmlTextNode("some more raw text"))