Framework
- Core Foundation
Overview
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 CFXMLNode
. 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 CFXMLNode
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 k
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 CFXMLNode
, CFXMLNode
, and CFXMLNode
functions to get the node type, data string, and additional information respectively. Use the CFXMLNode
function to get a node’s version number.