CFXMLNode

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 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.

Symbols

Data Types

CFXMLAttributeDeclarationInfo

Contains information about an element attribute definition.

CFXMLAttributeListDeclarationInfo

Contains a list of the attributes associated with an element.

CFXMLDocumentInfo

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

CFXMLDocumentTypeInfo

Contains the external ID of the DTD.

CFXMLElementInfo

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

CFXMLElementTypeDeclarationInfo

Contains a description of the element type.

CFXMLEntityInfo

Contains information describing an XML entity.

CFXMLEntityReferenceInfo

Contains information describing an XML entity reference.

CFXMLExternalID

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

CFXMLNode

A reference to a CFXMLNode object.

CFXMLNotationInfo

Contains the external ID of the notation.

CFXMLProcessingInstructionInfo

Contains the text of the processing instruction.

Constants

CFXMLEntityTypeCode

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

Node Current Version

The version of a CFXMLNode object.

CFXMLNodeTypeCode

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