Platforms to show: All Mac Windows Linux Cross-Platform
Back to XMLNodeMBS class.
XMLNodeMBS.appendChild(newChild as XMLNodeMBS) as XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the newChild is already in the tree, it is first removed.
newChild The node to add. If it is a XMLDocumentFragmentMBS object, the entire contents of the document fragment are moved into the child list of this node.
If the new node is from another document, we clone it first.
Returns the newly added node.
XMLNodeMBS.AttributeNode(Index as Integer) as XMLAttributeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Index is zero based up to AttributeCount-1.
XMLNodeMBS.AttributeNodes as XMLAttributeMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Gets a array containing the attributes of this node (if it is an XMLElementMBS) or null otherwise.
XMLNodeMBS.Child(Index as Integer) as XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Index is zero based up to ChildCount-1.
XMLNodeMBS.ChildNodes as XMLNodeMBS()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If there are no children, this is a array containing no nodes.
The array is a static snapshot of the content of the node.
XMLNodeMBS.Clone(deep as Boolean) as XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Pass true for deep parameter to copy all sub objects as well.
This function serves as a generic copy constructor for nodes.
The duplicate node has no parent ( parentNode returns nil.).
Cloning an XMLElementMBS copies all attributes and their values, including those generated by the XML processor to represent defaulted attributes, but this method does not copy any text it contains unless it is a deep clone, since the text is contained in a child XMLTextMBS node. Cloning any other type of node simply returns a copy of this node.
deep If true, recursively clone the subtree under the specified node; if false, clone only the node itself (and its attributes, if it is an XMLElementMBS).
XMLNodeMBS.compareDocumentPosition(other as XMLNodeMBS) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Compares the reference node, i.e. the node on which this method is being called, with a node, i.e. the one passed as a parameter, with regard to their position in the document and according to the document order.
other: The node to compare against this node.
Returns how the given node is positioned relatively to this node.
XMLNodeMBS.Constructor Private
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
XMLNodeMBS.insertBefore(newChild as XMLNodeMBS, refChild as XMLNodeMBS) as XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If refChild is nil, insert newChild at the end of the list of children.
If newChild is a XMLDocumentFragmentMBS object, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed. Note that a XMLNodeMBS that has never been assigned to refer to an actual node is == nil.
newChild The node to insert.
refChild The reference node, i.e., the node before which the new node must be inserted.
If the new node is from another document, we clone it first.
Returns the new node.
XMLNodeMBS.isDefaultNamespace(namespaceURI as String) as Boolean
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 to look for.
Returns true if the specified namespaceURI is the default namespace, false otherwise.
XMLNodeMBS.isEqualNode(other as XMLNodeMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method tests for equality of nodes, not sameness (i.e., whether the two nodes are pointers to the same object) which can be tested with XMLNodeMBS::isSameNode. All nodes that are the same will also be equal, though the reverse may not be true.
Two nodes are equal if and only if the following conditions are satisfied: The two nodes are of the same type.The following string attributes are equal: nodeName, localName, namespaceURI, prefix, nodeValue , baseURI. This is: they are both null, or they have the same length and are character for character identical. The attributes node maps are equal. This is: they are both nil, or they have the same length and for each node that exists in one map there is a node that exists in the other map and is equal, although not necessarily at the same index.The childNodes node lists are equal. This is: they are both nil, or they have the same length and contain equal nodes at the same index. This is true for XMLAttributeMBS nodes as for any other type of node. Note that normalization can affect equality; to avoid this, nodes should be normalized before being compared.
For two XMLDocumentTypeMBS nodes to be equal, the following conditions must also be satisfied: The following string attributes are equal: publicId, systemId, internalSubset. The entities node maps are equal. The notations node maps are equal.
On the other hand, the following do not affect equality: the ownerDocument attribute, the specified attribute for XMLAttributeMBS nodes, the isWhitespaceInElementContent attribute for XMLTextMBS nodes, as well as any user data or event listeners registered on the nodes.
other: The node to compare equality with.
If the nodes, and possibly subtrees are equal, true otherwise false.
XMLNodeMBS.isSameNode(other as XMLNodeMBS) as Boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
This method provides a way to determine whether two XMLNodeMBS references returned by the implementation reference the same object. When two XMLNodeMBS references are references to the same object, even if through a proxy, the references may be used completely interchangeably, such that all attributes have the same values and calling the same DOM method on either reference always has exactly the same effect.
other: The node to test against.
Returns true if the nodes are the same, false otherwise.
XMLNodeMBS.IterateAttributeNodes as XMLIterateAttributeNodesMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For use with For Each Loops in Xojo.
XMLNodeMBS.IterateChildNodes as XMLIterateChildNodesMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
For use with For Each Loops in Xojo.
XMLNodeMBS.lookupNamespaceURI(prefix as String) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The prefix to look for. If this parameter is null, the method will return the default namespace URI if any.
Returns the associated namespace URI or null if none is found.
XMLNodeMBS.lookupPrefix(namespaceURI as String) as String
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The default namespace declarations are ignored by this method.
namespaceURI: The namespace URI to look for.
Returns an associated namespace prefix if found, null if none is found. If more than one prefix are associated to the namespace prefix, the returned namespace prefix is implementation dependent.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Puts all XMLTextMBS nodes in the full depth of the sub-tree underneath this XMLNodeMBS, including attribute nodes, into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates XMLTextMBS nodes, i.e., there are neither adjacent XMLTextMBS nodes nor empty XMLTextMBS nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used.
Note: In cases where the document contains CDATASections, the normalize operation alone may not be sufficient, since XPointers do not differentiate between XMLTextMBS nodes and XMLCDATASectionMBS nodes.
XMLNodeMBS.removeChild(Node as XMLNodeMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns the old node.
XMLNodeMBS.replaceChild(newChild as XMLNodeMBS, oldChild as XMLNodeMBS) as XMLNodeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If newChild is a XMLDocumentFragmentMBS object, oldChild is replaced by all of the XMLDocumentFragmentMBS children, which are inserted in the same order.
If the newChild is already in the tree, it is first removed.
newChild The new node to put in the child list.
oldChild The node being replaced in the list.
If the new node is from another document, we clone it first.
Returns the old node.
The items on this page are in the following plugins: MBS XML Plugin.