Platforms to show: All Mac Windows Linux Cross-Platform
XMLDocumentMBS class
Super class: XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a XMLDocumentMBS, the XMLDocumentMBS interface also contains the factory methods needed to create these objects. The XMLNodeMBS objects created have a ownerDocument attribute which associates them with the XMLDocumentMBS within whose context they were created.
All methods can raise a XMLExceptionMBS object in case of a problem.
Subclass of the XMLNodeMBS class.
- 9 properties
- property DocType as XMLDocumentTypeMBS
- property DocumentElement as XMLElementMBS
- property DocumentURI as String
- property DOMConfig as XMLConfigurationMBS
- property InputEncoding as String
- property StrictErrorChecking as Boolean
- property XmlEncoding as String
- property XmlStandalone as Boolean
- property XmlVersion as String
- 39 methods
- method adoptNode(node as XMLNodeMBS) as XMLNodeMBS
- method ClearCache
- method Close
- method Constructor
- method Constructor(data as MemoryBlock)
- method Constructor(data as String)
- method Constructor(file as FolderItem)
- method Constructor(namespaceURI as String, qualifiedName as string, DocumentType as XMLDocumentTypeMBS = nil)
- method createAttribute(Name as String) as XMLAttributeMBS
- method createAttributeNS(namespaceURI as String, qualifiedName as String) as XMLAttributeMBS
- method createCDATASection(Data as String) as XMLCDATASectionMBS
- method createComment(Text as String) as XMLCommentMBS
- method createDocumentFragment as XMLDocumentFragmentMBS
- method createDocumentType(Name as String, PublicID as String = "", SystemID as String = "") as XMLDocumentTypeMBS
- method createElement(Name as String) as XMLElementMBS
- method createElementNS(namespaceURI as String, qualifiedName as String) as XMLElementMBS
- method createEntity(Name as String) as XMLEntityMBS
- method createEntityReference(Text as String) as XMLEntityReferenceMBS
- method createNodeIterator(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLNodeIteratorMBS
- method createNotation(Name as String) as XMLNotationMBS
- method createProcessingInstruction(Target as String, Data as string) as XMLCDATASectionMBS
- method createTextNode(Text as String) as XMLTextMBS
- method createTreeWalker(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLTreeWalkerMBS
- method ElementsByTagName(TagName as String) as XMLElementMBS()
- method ElementsByTagNameNS(namespaceURI as string, localName as String) as XMLElementMBS()
- method evaluate(expression as String, contextNode as XMLNodeMBS, type as Integer) as XMLXPathResultMBS
- method getElementById(elementId as String) as XMLElementMBS
- method importNode(node as XMLNodeMBS) as XMLNodeMBS
- method IterateElementsByTagName(TagName as String) as XMLIterateElementsMBS
- method IterateElementsByTagNameNS(namespaceURI as string, localName as String) as XMLIterateElementsMBS
- method LoadXml(data as MemoryBlock)
- method LoadXml(data as String)
- method LoadXml(file as FolderItem)
- method LoadXmlMT(data as MemoryBlock)
- method LoadXmlMT(data as String)
- method LoadXmlMT(file as FolderItem)
- method NodeFromHandle(Handle as Integer) as XMLNodeMBS
- method normalizeDocument
- method renameNode(node as XMLNodeMBS, namespaceURI as String, qualifiedName as String) as XMLNodeMBS
- 2 shared methods
- shared method Create as XMLDocumentMBS
- shared method Create(namespaceURI as String, qualifiedName as string, DocumentType as XMLDocumentTypeMBS = nil) as XMLDocumentMBS
- 13 constants
Show Values
Constant | Value | Description |
---|---|---|
ShowAll | &hFFFF |
Show all XMLNodeMBS(s). |
ShowAttribute | 2 |
Show XMLAttributeMBS nodes. This is meaningful only when creating an XMLNodeIteratorMBS or XMLTreeWalkerMBS with an attribute node as its root; in this case, it means that the attribute node will appear in the first position of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. |
ShowCDataSection | 8 |
Show XMLCDATASectionMBS nodes. |
ShowComment | &h80 |
Show DOMComment nodes. |
ShowDocument | &h100 |
Show XMLDocumentMBS nodes. |
ShowDocumentFragment | &h400 |
Show XMLDocumentFragmentMBS nodes. |
ShowDocumentType | &h200 |
Show XMLDocumentTypeMBS nodes. |
ShowElement | 1 |
Show XMLElementMBS nodes. |
ShowEntity | &h20 |
Show XMLEntityMBS nodes. This is meaningful only when creating an XMLNodeIteratorMBS or XMLTreeWalkerMBS with an XMLEntityMBS node as its root; in this case, it means that the XMLEntityMBS node will appear in the first position of the traversal. Since entities are not part of the document tree, they do not appear when traversing over the document tree. |
ShowEntityReference | &h10 |
Show XMLEntityReferenceMBS nodes. |
ShowNotation | &h800 |
Show XMLNotationMBS nodes. This is meaningful only when creating an XMLNodeIteratorMBS or XMLTreeWalkerMBS with a XMLNotationMBS node as its root; in this case, it means that the XMLNotationMBS node will appear in the first position of the traversal. Since notations are not part of the document tree, they do not appear when traversing over the document tree. |
ShowProcessingInstruction | &h40 |
Show XMLProcessingInstructionMBS nodes. |
ShowText | 4 |
Show XMLTextMBS nodes. |
Super class XMLNodeMBS
- 20 properties
- property AttributeCount as Integer
- property BaseURI as String
- property ChildCount as Integer
- property FirstChild as XMLNodeMBS
- property Handle as Integer
- property hasAttributes as Boolean
- property hasChildren as Boolean
- property LastChild as XMLNodeMBS
- property LocalName as String
- property NamespaceURI as String
- property NextSibling as XMLNodeMBS
- property NodeName as String
- property NodeType as Integer
- property NodeValue as String
- property OwnerDocument as XMLDocumentMBS
- property ParentNode as XMLNodeMBS
- property Prefix as String
- property PreviousSibling as XMLNodeMBS
- property ReferenceCount as Integer
- property toString as String
- 19 methods
- method appendChild(newChild as XMLNodeMBS) as XMLNodeMBS
- method AttributeNode(Index as Integer) as XMLAttributeMBS
- method AttributeNodes as XMLAttributeMBS()
- method Child(Index as Integer) as XMLNodeMBS
- method ChildNodes as XMLNodeMBS()
- method Clone(deep as Boolean) as XMLNodeMBS
- method compareDocumentPosition(other as XMLNodeMBS) as Integer
- method Constructor Private
- method insertBefore(newChild as XMLNodeMBS, refChild as XMLNodeMBS) as XMLNodeMBS
- method isDefaultNamespace(namespaceURI as String) as Boolean
- method isEqualNode(other as XMLNodeMBS) as Boolean
- method isSameNode(other as XMLNodeMBS) as Boolean
- method IterateAttributeNodes as XMLIterateAttributeNodesMBS
- method IterateChildNodes as XMLIterateChildNodesMBS
- method lookupNamespaceURI(prefix as String) as String
- method lookupPrefix(namespaceURI as String) as String
- method Normalize
- method removeChild(Node as XMLNodeMBS)
- method replaceChild(newChild as XMLNodeMBS, oldChild as XMLNodeMBS) as XMLNodeMBS
- 18 constants
Document Positions
Constant | Value | Description |
---|---|---|
DocumentPositionContainedBy | 16 |
The node is contained by the reference node. A node which is contained is always following, too. |
DocumentPositionContains | 8 |
The node contains the reference node. A node which contains is always preceding, too. |
DocumentPositionDisconnected | 1 |
The two nodes are disconnected. Order between disconnected nodes is always implementation-specific. |
DocumentPositionFollowing | 4 |
The node follows the reference node. |
DocumentPositionImplementationSpecific | 32 |
The determination of preceding versus following is implementation-specific. |
DocumentPositionPreceding | 2 |
The second node precedes the reference node. |
Types
Constant | Value | Description |
---|---|---|
TypeAttribute | 2 |
Attribute Node |
TypeCDataSection | 4 |
CDataSection Node |
TypeComment | 8 |
Comment Node |
TypeDocument | 9 |
Document Node |
TypeDocumentFragment | 11 |
Document Fragment |
TypeDocumentType | 10 |
Document Type Node |
TypeElement | 1 |
Element Node |
TypeEntity | 6 |
Entity Node |
TypeEntityReferenceNode | 5 |
Entity Reference Node |
TypeNotation | 12 |
Notation Node |
TypeProcessingInstruction | 7 |
Processing Instruction Node |
TypeText | 3 |
Text Node |
This class has no sub classes.
Some methods using this class:
- XMLDOMParserMBS.Parse(data as MemoryBlock) as XMLDocumentMBS
- XMLDOMParserMBS.Parse(data as string) as XMLDocumentMBS
- XMLParserMBS.parse(inputSource as XMLInputMBS) as XMLDocumentMBS
- XMLParserMBS.parseFile(file as FolderItem) as XMLDocumentMBS
- XMLParserMBS.parseURI(URI as String) as XMLDocumentMBS
Some properties using for this class:
- XMLNodeIteratorMBS.Document as XMLDocumentMBS
- XMLNodeMBS.OwnerDocument as XMLDocumentMBS
- XMLTreeWalkerMBS.Document as XMLDocumentMBS
Some examples using this class:
Blog Entries
- News from the MBS Xojo Plugins Version 23.5
- Embracing for each loops
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.5
- News from the MBS Xojo Plugins Version 23.4
- News from the MBS Xojo Plugins Version 23.3
- MonkeyBread Software Releases the MBS Xojo Plugins in version 23.3
- News from the MBS Xojo Plugins in Version 23.0
- News from the MBS Xojo Plugins Version 22.5
- MonkeyBread Software Releases the MBS Xojo Plugins in version 22.5
- Iterate over XML nodes
Xojo Developer Magazine
- 22.1, page 9: News
- 21.5, page 10: News
- 21.2, page 68: XML for Beginners, Using XML with the MBS Plugin by Stefanie Juchmes
- 21.2, page 65: XML for Beginners, Using XML with the MBS Plugin by Stefanie Juchmes
- 21.1, page 28: News from MBS Xojo Plugins, What's up with MonkeyBread Software by Stefanie Juchmes
Release notes
- Version 23.5
- Added renameNode and adoptNode methods to XMLDocumentMBS class.
- Improved exception handling for threaded XMLDocumentMBS methods.
- Version 23.4
- Added importNode method for XMLDocumentMBS class.
- Fixed crash in XMLDocumentMBS constructor when passing folderitem pointing to a folder.
- Version 23.3
- Added evaluate method to XMLDocumentMBS class to do XPath queries.
- Version 23.0
- Added NodeFromHandle function to XMLDocumentMBS class.
- Version 22.5
- Added LoadXmlMT to XMLDocumentMBS class to load thread friendly.
The items on this page are in the following plugins: MBS XML Plugin.
XMLDocumentFragmentMBS - XMLDocumentTypeMBS