Platforms to show: All Mac Windows Linux Cross-Platform

Back to XMLNodeMBS class.

XMLNodeMBS.AttributeCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries number of attributes.
Example

Dim doc As New XMLDocumentMBS
Dim node As XMLElementMBS = doc.createElement("Hello")

node.AttributeValue("Hello") = "World"
node.AttributeValue("Value") = "123"
node.AttributeValue("Test") = "Value"

MessageBox node.AttributeCount.ToString // shows 3

(Read only property)

XMLNodeMBS.BaseURI as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The absolute base URI of this node or "" if undefined.

This value is computed according to. However, when the XMLDocumentMBS supports the feature "HTML" , the base URI is computed using first the value of the href attribute of the HTML BASE element if any, and the value of the documentURI attribute from the XMLDocumentMBS interface otherwise.

When the node is an XMLElementMBS, a XMLDocumentMBS or a a XMLProcessingInstructionMBS, this attribute represents the properties [base URI] defined in . When the node is a XMLNotationMBS, an XMLEntityMBS, or an XMLEntityReferenceMBS, this attribute represents the properties [declaration base URI].
(Read only property)

XMLNodeMBS.ChildCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries number of child nodes.
Example

Dim xml As String = "<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>"
Dim doc As New XMLDocumentMBS(xml)
Dim node As XMLElementMBS = doc.DocumentElement

MessageBox node.ChildCount.ToString+" Children"

(Read only property)

XMLNodeMBS.FirstChild as XMLNodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the first child of this node.
Example

Dim xml As String = "<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>"
Dim doc As New XMLDocumentMBS(xml)
Dim DocumentElement As XMLElementMBS = doc.DocumentElement

Dim node As XmlNodeMBS = DocumentElement.FirstChild
While node <> Nil

// show each child
MessageBox node.toString

node = node.NextSibling
// loop ends when there is no next one
Wend

If there is no such node, this returns nil.
(Read only property)

XMLNodeMBS.Handle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The internal object reference.

(Read only property)

XMLNodeMBS.hasAttributes as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns whether this node (if it is an element) has any attributes.

Returns true if this node has any attributes, false otherwise.
(Read only property)

XMLNodeMBS.hasChildren as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This is a convenience method to allow easy determination of whether a node has any children.
Example

Dim xml As String = "<test>test</test>"
Dim doc As New XMLDocumentMBS(xml)
Dim DocumentElement As XMLElementMBS = doc.DocumentElement

MessageBox "HasChildren: "+DocumentElement.hasChildren.ToString // shows true

DocumentElement.removeChild DocumentElement.FirstChild

MessageBox "HasChildren after removal: "+DocumentElement.hasChildren.ToString // shows false

Returns true if the node has any children, false if the node has no children.
(Read only property)

XMLNodeMBS.LastChild as XMLNodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the last child of this node.
Example

Dim xml As String = "<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>"
Dim doc As New XMLDocumentMBS(xml)
Dim DocumentElement As XMLElementMBS = doc.DocumentElement

// loop over nodes backwards
Dim node As XmlNodeMBS = DocumentElement.LastChild
While node <> Nil

// show each child
MessageBox node.toString

node = node.PreviousSibling
// loop ends when there is no previous one
Wend

If there is no such node, this returns nil.
(Read only property)

XMLNodeMBS.LocalName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the local part of the qualified name of this node.

For nodes created with a DOM Level 1 method, such as createElement from the XMLDocumentMBS interface, it is "".
(Read only property)

XMLNodeMBS.NamespaceURI as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The namespace URI.

Get the namespace URI of this node, or "" if it is unspecified.
This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.

For nodes of any type other than element and attribute and nodes created with a DOM Level 1 method, such as createElement from the XMLDocumentMBS interface, this is always "".
(Read only property)

XMLNodeMBS.NextSibling as XMLNodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the node immediately following this node.
Example

Dim xml As String = "<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>"
Dim doc As New XMLDocumentMBS(xml)
Dim DocumentElement As XMLElementMBS = doc.DocumentElement

Dim node As XmlNodeMBS = DocumentElement.FirstChild
While node <> Nil

// show each child
MessageBox node.toString

node = node.NextSibling
// loop ends when there is no next one
Wend

If there is no such node, this returns nil.
(Read only property)

XMLNodeMBS.NodeName as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The name of this node, depending on its type.

This property can also be used with name "Name".
(Read only property)

XMLNodeMBS.NodeType as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The type of this node.
Example

Dim xml As String = "<test id=""123"">Hello</test>"
Dim doc As New XMLDocumentMBS(xml)

MessageBox doc.DocumentElement.NodeType.ToString // shows 1 for element

See Type* constants.
(Read only property)

XMLNodeMBS.NodeValue as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the value of this node, depending on its type.

Sets the value of the node.

Any node which can have a nodeValue will also accept requests to set it to a string. The exact response to this varies from node to node -- Attribute, for example, stores its values in its children and has to replace them with a new Text holding the replacement value.

For most types of Node, value is null and attempting to set it will throw XMLExceptionMBS. This will also be thrown if the node is read-only.

This property can also be used with name Value.
(Read and Write property)

XMLNodeMBS.OwnerDocument as XMLDocumentMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the XMLDocumentMBS object associated with this node.

This is also the XMLDocumentMBS object used to create new nodes.
When this node is a XMLDocumentMBS or a XMLDocumentTypeMBS which is not used with any XMLDocumentMBS yet, this is nil.
(Read only property)

XMLNodeMBS.ParentNode as XMLNodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the parent of this node.

All nodes, except XMLDocumentMBS, XMLDocumentFragmentMBS, and XMLAttributeMBS may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, a null XMLNodeMBS is returned.
(Read only property)

XMLNodeMBS.Prefix as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Get the namespace prefix of this node, or "" if it is unspecified.

Can be set.
Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the XMLElementMBS and XMLAttributeMBS interfaces, when applicable.

Note also that changing the prefix of an attribute, that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
(Read and Write property)

XMLNodeMBS.PreviousSibling as XMLNodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Gets the node immediately preceding this node.
Example

Dim xml As String = "<test id=""123""><f>1</f><f>2</f><f>3</f><f>4</f></test>"
Dim doc As New XMLDocumentMBS(xml)
Dim DocumentElement As XMLElementMBS = doc.DocumentElement

// loop over nodes backwards
Dim node As XmlNodeMBS = DocumentElement.LastChild
While node <> Nil

// show each child
MessageBox node.toString

node = node.PreviousSibling
// loop ends when there is no previous one
Wend

If there is no such node, this returns nil.
(Read only property)

XMLNodeMBS.ReferenceCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The reference count.

Helps us to debug memory leaks.
(Read only property)

XMLNodeMBS.toString as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an UTF-8 encoded text representation of the XML.
Example

Dim xml As String = "<test id=""123"">Hello</test>"
Dim doc As New XMLDocumentMBS(xml)

MessageBox doc.toString

Convenience function to use XMLSerializerMBS class internally.
(Read only property)

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


The biggest plugin in space...