Converts non-XML node objects to XMLTextNode objects

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.

USAGE:

asXMLNode(x)

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:

AUTHOR(S):

Duncan Temple Lang

REFERENCES:

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

SEE ALSO:

EXAMPLES:

   # creates an XMLTextNode.
 asXMLNode("a text node")

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