Platforms to show: All Mac Windows Linux Cross-Platform

Back to XMLElementMBS class.

XMLElementMBS.ChildElementCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The number of child nodes that are of type XMLElementMBS.

Note: the count is computed every time this function is invoked

The number of XMLElementMBS objects that are direct children of this object (nested elements are not counted), or 0 if there is none.
(Read only property)

Some examples using this property:

XMLElementMBS.FirstElementChild as XMLElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The first child of type XMLElementMBS.

The XMLElementMBS object that is the first element node among the child nodes of this node, or nil if there is none.
(Read only property)

Some examples using this property:

XMLElementMBS.LastElementChild as XMLElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The last child of type XMLElementMBS.
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

// looping over elements backwards, skips e.g. text nodes and comments
Dim node As XMLElementMBS = DocumentElement.LastElementChild
While node <> Nil

// show each child
MessageBox node.toString

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

The XMLElementMBS object that is the last element node among the child nodes of this node, or nil if there is none.
(Read only property)

XMLElementMBS.NextElementSibling as XMLElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The next sibling node of type XMLElementMBS.
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

// looping over elements skips e.g. text nodes and comments
Dim node As XMLElementMBS = DocumentElement.FirstElementChild
While node <> Nil

// show each child
MessageBox node.toString

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

The XMLElementMBS object that is the next sibling element node in document order, or nil if there is none.
(Read only property)

Some examples using this property:

XMLElementMBS.PreviousElementSibling as XMLElementMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The previous sibling node of type XMLElementMBS.
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

// looping over elements backwards, skips e.g. text nodes and comments
Dim node As XMLElementMBS = DocumentElement.LastElementChild
While node <> Nil

// show each child
MessageBox node.toString

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

The XMLElementMBS object that is the previous sibling element node in document order, or nil if there is none.
(Read only property)

XMLElementMBS.SchemaTypeInfo as XMLTypeInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property XML MBS XML Plugin 22.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the type information associated with this element.

(Read only property)

XMLElementMBS.TagName 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 the element.

For example, in: <elementExample id="demo"> ... </elementExample>, tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM.
(Read only property)

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


The biggest plugin in space...