Platforms to show: All Mac Windows Linux Cross-Platform

CFXMLNodeMBS class deprecated

Super class: CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreFoundation MBS MacCF Plugin 3.4 ✅ Yes ❌ No ❌ No ✅ Yes All
Function: A class for a xml node.
dim documentinfo as new CFXMLDocumentInfoMBS
dim docnode as new CFXMLNodeMBS
dim instructionNode as new CFXMLNodeMBS
dim xmldocument as new CFTreeMBS
dim instructionTree as new CFTreeMBS
dim instructionInfo as new CFXMLProcessingInstructionInfoMBS
dim personInfo as new CFXMLElementInfoMBS
dim personNode as new CFXMLNodeMBS
dim personTree as new CFTreeMBS
dim nameInfo as new CFXMLElementInfoMBS
dim nameNode as new CFXMLNodeMBS
dim nameTree as new CFTreeMBS
dim nameTextNode as new CFXMLNodeMBS
dim nameTextTree as new CFTreeMBS
dim nameTextNode2 as new CFXMLNodeMBS
dim nameTextTree2 as new CFTreeMBS
dim person as CFStringMBS

const kCFStringEncodingUTF8=&h08000100

// create a document node


xmldocument.CreateWithXMLNode docNode

// Instruction Tag

instructionInfo.DataString=NewCFStringMBS("version=""1.0"" encoding=""utf-8"" ")

// root element


personNode.CreateElement person, personInfo
personTree.CreateWithXMLNode personNode


namenode.CreateElement NewCFStringMBS("name"), nameInfo
nameTree.CreateWithXMLNode nameNode
personTree.AppendChild nameTree

nameTextNode.CreateText NewCFStringMBS("Apple")
nameTextTree.CreateWithXMLNode nameTextNode
nameTree.AppendChild nameTextTree

nameTextNode2.CreateText NewCFStringMBS("Orange")
nameTextTree2.CreateWithXMLNode nameTextNode2
nameTree.AppendChild nameTextTree2


xmldocument.AppendChild instructionTree
xmldocument.AppendChild personTree

MsgBox xmldocument.XMLData.str

// shows "<?xml version="1.0" encoding="utf-8" ?><person><name>AppleOrange</name></person>"
This item is deprecated and should no longer be used. You can use XML classes instead.
An CFXMLNode describes an individual XML construct - like a tag, or a comment, or a string of character data. Each CFXMLNode contains 3 main pieces of information - the node's type, the data string, and a pointer to an additional data structure. The node's type ID is an enum value of type CFXMLNodeTypeCode. The data string is always a CFStringRef; the meaning of the string is dependent on the node's type ID. 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 below for the mapping from type ID to meaning of the data string and structure of the additional data.

Type codes for the different possible XML nodes; this list may grow:

Constant namevalueMeaning of Data stringAdditional information
kCFXMLNodeTypeDocument1<currently unused>CFXMLDocumentInfoMBS
kCFXMLNodeTypeElement2tag nameCFXMLElementInfoMBS
kCFXMLNodeTypeAttribute3<currently unused><currently unused>
kCFXMLNodeTypeProcessingInstruction4name of the targetCFXMLProcessingInstructionInfoMBS
kCFXMLNodeTypeComment5text of the commentnil
kCFXMLNodeTypeText6the text's contentsnil
kCFXMLNodeTypeCDATASection7text of the CDATAnil
kCFXMLNodeTypeDocumentFragment8<currently unused><currently unused>
kCFXMLNodeTypeEntity9name of the entityCFXMLEntityInfoMBS
kCFXMLNodeTypeEntityReference10name of the referenced entityCFXMLEntityReferenceInfoMBS
kCFXMLNodeTypeDocumentType11name given as top-level elementCFXMLDocumentTypeInfoMBS
kCFXMLNodeTypeWhitespace12text of the whitespacenil
kCFXMLNodeTypeNotation13notation nameCFXMLNotationInfoMBS
kCFXMLNodeTypeElementTypeDeclaration14tag nameCFXMLElementTypeDeclarationInfoMBS
kCFXMLNodeTypeAttributeListDeclaration15tag nameCFXMLAttributeListDeclarationInfoMBS
Subclass of the CFObjectMBS class.

Super class CFObjectMBS

This class has no sub classes.

Some methods using this class:

Some events using this class:

Some examples using this class:

Blog Entries

The items on this page are in the following plugins: MBS MacCF Plugin.

CFXMLExternalIDMBS   -   CFXMLNotationInfoMBS

Feedback: Report problem or ask question.

The biggest plugin in space...

Start Chat