Platforms to show: All Mac Windows Linux Cross-Platform
XMLNodeFilterMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | XML | MBS XML Plugin | 22.4 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If a XMLNodeIteratorMBS or XMLTreeWalkerMBS is given a XMLNodeFilterMBS, it applies the filter before it returns the next node. If the filter says to accept the node, the traversal logic returns it; otherwise, traversal looks for the next node and pretends that the node that was rejected was not there.
The DOM does not provide any filters. XMLNodeFilterMBS is just an class that users can implement to provide their own filters by filling in the event.
XMLNodeFilterMBSs do not need to know how to traverse from node to node, nor do they need to know anything about the data structure that is being traversed. This makes it very easy to write filters, since the only thing they have to know how to do is evaluate a single node. One filter may be used with a number of different kinds of traversals, encouraging code reuse.
- event acceptNode(node as XMLNodeMBS) as Integer
- 2 methods
- method Constructor
- method Destructor
- 3 constants
Filter Results
Constant | Value | Description |
---|---|---|
FilterAccept | 1 |
Accept the node. Navigation methods defined for XMLNodeIteratorMBS or XMLTreeWalkerMBS will return this node. |
FilterReject | 2 |
Reject the node. Navigation methods defined for XMLNodeIteratorMBS or XMLTreeWalkerMBS will not return this node. For XMLTreeWalkerMBS, the children of this node will also be rejected. XMLNodeIteratorMBSs treat this as a synonym for FilterSkip. |
FilterSkip | 3 |
Skip this single node. Navigation methods defined for XMLNodeIteratorMBS or XMLTreeWalkerMBS will not return this node. For both XMLNodeIteratorMBS and XMLTreeWalkerMBS, the children of this node will still be considered. |
This class has no sub classes.
Some methods using this class:
- XMLDocumentMBS.createNodeIterator(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLNodeIteratorMBS
- XMLDocumentMBS.createTreeWalker(root as XMLNodeMBS = nil, whatToShow as Integer = &hFFFF, entityReferenceExpansion as boolean = false, filter as XMLNodeFilterMBS = nil) as XMLTreeWalkerMBS
Some properties using for this class:
- XMLNodeIteratorMBS.Filter as XMLNodeFilterMBS
- XMLTreeWalkerMBS.Filter as XMLNodeFilterMBS
Blog Entries
The items on this page are in the following plugins: MBS XML Plugin.
XMLIterateElementsMBS - XMLNodeIteratorMBS