A CFXMLNode object describes an individual XML construct—like a tag, or a comment, or a string of character data. CFXMLNode is intended to be used with the CFXMLParser and CFXMLTree opaque types.

Each CFXMLNode object contains three main pieces of information—the node's type, the data string, and a pointer to an additional information data structure. A CFXMLNode object’s type is one of the enumerations described in CFXMLNodeTypeCode. The data string is always a CFString object; the meaning of the string is dependent on the node's type. The format of the additional data is also dependent on the node's type; in general, there is a custom structure for each type that requires additional data. See CFXMLNodeTypeCode for the mapping from a node type to meaning of the data string, and structure of the additional information. Note that these structures are versioned and may change as the parser changes. The current version can always be identified by the kCFXMLNodeCurrentVersion constant; earlier versions can be identified and used by passing earlier values for the version number (although the older structures would have been removed from the header).

You create a CFXMLNode object using one of the create or copy functions. Use the CFXMLNodeGetTypeCode, CFXMLNodeGetString, and CFXMLNodeGetInfoPtr functions to get the node type, data string, and additional information respectively. Use the CFXMLNodeGetVersion function to get a node’s version number.


Data Types


Contains information about an element attribute definition.


Contains a list of the attributes associated with an element.


Contains the source URL and text encoding information for the XML document.


Contains the external ID of the DTD.


Contains a list of element attributes packaged as CFDictionary key/value pairs.


Contains a description of the element type.


Contains information describing an XML entity.


Contains information describing an XML entity reference.


Contains the system and public IDs for an external entity reference.


A reference to a CFXMLNode object.


Contains the external ID of the notation.


Contains the text of the processing instruction.



The entity type identification codes that the parser uses to describe XML entities.

Node Current Version

The version of a CFXMLNode object.


The various XML data type identification codes that the parser uses to describe XML structures.