Platforms to show: All Mac Windows Linux Cross-Platform
Back to XMLDocumentMBS class.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
You should usually not need to use this method.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This frees memory for all nodes and the XML document now.
You should usually not need to use this method.
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
XMLDocumentMBS.Constructor(data as MemoryBlock)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
XMLDocumentMBS.Constructor(data as String)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
XMLDocumentMBS.Constructor(file as FolderItem)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also:
XMLDocumentMBS.Constructor(namespaceURI as String, qualifiedName as string, DocumentType as XMLDocumentTypeMBS = nil)
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
namespaceURI: The namespace URI of the document element to create.
qualifiedName: The qualified name of the document element to be created.
DocumentType: The type of document to be created or nil. When doctype is not nil, its ownerDocument attribute is set to the document being created.
See also:
XMLDocumentMBS.createAttribute(Name as String) as XMLAttributeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Note that the XMLAttributeMBS instance can then be set on an XMLElementMBS using the setAttributeNode method. <br>To create an attribute with a qualified name and namespace URI, use the createAttributeNS method.
name: The name of the attribute.
Returns a new XMLAttributeMBS object with the nodeName attribute set to name, and localName, prefix, and namespaceURI set to "". The value of the attribute is the empty string.
XMLDocumentMBS.createAttributeNS(namespaceURI as String, qualifiedName as String) as XMLAttributeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
namespaceURI: The namespace URI of the attribute to create.
qualifiedName: The qualified name of the attribute to instantiate.
XMLDocumentMBS.createCDATASection(Data as String) as XMLCDATASectionMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLDocumentMBS.createComment(Text as String) as XMLCommentMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLDocumentMBS.createDocumentFragment as XMLDocumentFragmentMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLDocumentMBS.createDocumentType(Name as String, PublicID as String = "", SystemID as String = "") as XMLDocumentTypeMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLDocumentMBS.createElement(Name as String) as XMLElementMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Note that the instance returned implements the XMLElementMBS interface, so attributes can be specified directly on the returned object.
In addition, if there are known attributes with default values, XMLAttributeMBS nodes representing them are automatically created and attached to the element.
To create an element with a qualified name and namespace URI, use the createElementNS method.
tagName The name of the element type to instantiate. For XML, this is case-sensitive.
A new XMLElementMBS object with the nodeName attribute set to tagName, and localName, prefix, and namespaceURI set to "".
XMLDocumentMBS.createElementNS(namespaceURI as String, qualifiedName as String) as XMLElementMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
namespaceURI: The namespace URI of the element to create.
qualifiedName: The qualified name of the element type to instantiate.
XMLDocumentMBS.createEntity(Name as String) as XMLEntityMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
name: The name of the entity to instantiate.
XMLDocumentMBS.createEntityReference(Text as String) as XMLEntityReferenceMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
In addition, if the referenced entity is known, the child list of the XMLEntityReferenceMBS node is made the same as that of the corresponding XMLEntityMBS node.If any descendant of the XMLEntityMBS node has an unbound namespace prefix, the corresponding descendant of the created XMLEntityReferenceMBS node is also unbound; (its namespaceURI is nil). The DOM Level 2 does not support any mechanism to resolve namespace prefixes.
name: The name of the entity to reference.
Returns the new XMLEntityReferenceMBS object.
XMLDocumentMBS.createNodeIterator(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLNodeIteratorMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the document subtree governed by a particular node, the results of a query, or any other set of nodes. The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2 specifies a single NodeIterator implementation for document-order traversal of a document subtree. Instances of these iterators are created by calling createNodeIterator().
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set expandEntityReferences to true when creating the iterator. To produce a view of the document that has entity reference nodes but no entity expansion, use the whatToShow flags to show the entity reference node and set expandEntityReferences to false.
root: The root node of the DOM tree
whatToShow: This attribute determines which node types are presented via the iterator.
filter: The filter used to screen nodes .
entityReferenceExpansion: The value of this flag determines whether the children of entity reference nodes are visible to the iterator. If false, they will be skipped over.
Some examples using this method:
XMLDocumentMBS.createNotation(Name as String) as XMLNotationMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
name: The name of the notation to instantiate
Returns a XMLNotationMBS that references the newly created XMLNotationMBS node.
XMLDocumentMBS.createProcessingInstruction(Target as String, Data as string) as XMLCDATASectionMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
target: The target part of the processing instruction.
data: The data for the node.
XMLDocumentMBS.createTextNode(Text as String) as XMLTextMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLDocumentMBS.createTreeWalker(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLTreeWalkerMBS
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs navigation using a TreeWalker will automatically support any view defined by a TreeWalker.
Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips all nodes except for XMLTextMBS nodes and the root node of a document. In the logical view that results, all text nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the structure of the original document.
To produce a view of the document that has entity references expanded and does not expose the entity reference node itself, use the whatToShow flags to hide the entity reference node and set expandEntityReferences to true when creating the TreeWalker. To produce a view of the document that has entity reference nodes but no entity expansion, use the whatToShow flags to show the entity reference node and set expandEntityReferences to false
root: The root node of the DOM tree
whatToShow: This attribute determines which node types are presented via the tree-walker.
filter: The filter used to screen nodes
entityReferenceExpansion: The value of this flag determines whether the children of entity reference nodes are visible to the tree-walker. If false, they will be skipped over.
The items on this page are in the following plugins: MBS XML Plugin.