asXMLNode: Converts non-XML node objects to XMLTextNode objects

Description Usage Arguments Value Author(s) References See Also Examples

Description

This function is used to convert S objects that are not already XMLNode objects into objects of that class. Specifically, it treats the object as a string and creates an XMLTextNode object.

Also, there is a method for converting an XMLInternalNode - the C-level libxml representation of a node - to an explicit R-only object which contains the R values of the data in the internal node.

Usage

1

Arguments

x

the object to be converted to an XMLNode object. This is typically alread an object that inherits from XMLNode or a string.

Value

An object of class XMLNode.

Author(s)

Duncan Temple Lang

References

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

See Also

xmlNode xmlTextNode

Examples

1
2
3
4
5
   # creates an XMLTextNode.
 asXMLNode("a text node")

   # unaltered.
 asXMLNode(xmlNode("p"))

cosmicexplorer/xmlr documentation built on May 30, 2019, 8:28 a.m.