Platforms to show: All Mac Windows Linux Cross-Platform

XMLXPathResultMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class XML MBS XML Plugin 23.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for an XPath result.

The DOMXPathResult interface represents the result of the evaluation of an XPath 1.0 or XPath 2.0 expression within the context of a particular node. Since evaluation of an XPath expression can result in various result types, this object makes it possible to discover and manipulate the type and value of the result.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

Result Types

Constant Value Description
ResultTypeAny 0 [XPath 1.0] This code does not represent a specific type. An evaluation of an XPath expression will never produce this type. If this type is requested, then the evaluation returns whatever type naturally results from evaluation of the expression. If the natural result is a node set when ResultTypeAny was requested, then ResultTypeUnorderedNodeIterator is always the resulting type. Any other representation of a node set must be explicitly requested.
ResultTypeAnyUnorderedNode 8 [XPath 1.0] The result is a node set as defined by XPath 1.0 and will be accessed as a single node, which may be null if the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once any node in the resulting set has been found. If there is more than one node in the actual result, the single node returned might not be the first in document order.
ResultTypeBoolean 3 [XPath 1.0] The result is a boolean as defined by XPath 1.0. Document modification does not invalidate the boolean, but may mean that reevaluation would not yield the same boolean.
ResultTypeFirstOrderedNode 9 [XPath 1.0] The result is a node set as defined by XPath 1.0 and will be accessed as a single node, which may be null if the node set is empty. Document modification does not invalidate the node, but may mean that the result node no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once the first node in document order of the resulting set has been found. If there are more than one node in the actual result, the single node returned will be the first in document order.
ResultTypeFirstResult 100 [XPath 2.0] The result is a sequence as defined by XPath 2.0 and will be accessed as a single current value or there will be no current value if the sequence is empty. Document modification does not invalidate the value, but may mean that the result no longer corresponds to the current document. This is a convenience that permits optimization since the implementation can stop once the first item in the resulting sequence has been found. If there is more than one item in the actual result, the single item returned might not be the first in document order.
ResultTypeIteratorResult 101 [XPath 2.0] The result is a sequence as defined by XPath 2.0 that will be accessed iteratively. Document modification invalidates the iteration.
ResultTypeNumber 1 [XPath 1.0] The result is a number as defined by XPath 1.0. Document modification does not invalidate the number, but may mean that reevaluation would not yield the same number.
ResultTypeOrderedNodeIterator 5 [XPath 1.0] The result is a node set as defined by XPath 1.0 that will be accessed iteratively, which will produce document-ordered nodes. Document modification invalidates the iteration.
ResultTypeOrderedNodeSnapshot 7 [XPath 1.0] The result is a node set as defined by XPath 1.0 that will be accessed as a snapshot list of nodes that will be in original document order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.
ResultTypeSnapshotResult 102 [XPath 2.0] The result is a sequence as defined by XPath 2.0 that will be accessed as a snapshot list of values. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and any items in the snapshot may have been altered, moved, or removed from the document.
ResultTypeString 2 [XPath 1.0] The result is a string as defined by XPath 1.0. Document modification does not invalidate the string, but may mean that the string no longer corresponds to the current document.
ResultTypeUnorderedNodeIterator 4 [XPath 1.0] The result is a node set as defined by XPath 1.0 that will be accessed iteratively, which may not produce nodes in a particular order. Document modification invalidates the iteration. This is the default type returned if the result is a node set and ResultTypeAny is requested.
ResultTypeUnorderedNodeSnapshot 6 [XPath 1.0] The result is a node set as defined by XPath 1.0 that will be accessed as a snapshot list of nodes that may not be in a particular order. Document modification does not invalidate the snapshot but may mean that reevaluation would not yield the same snapshot and nodes in the snapshot may have been altered, moved, or removed from the document.

This class has no sub classes.

Some methods using this class:

Some examples using this class:

Blog Entries

Xojo Developer Magazine

Release notes


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


XMLValidatorMessageMBS   -   XMPAssertNotifyMBS


The biggest plugin in space...