ddn.data.xml.xpointer
XPointer support (phased).
This module is a minimal starting point for XPointer-like addressing.
Current scope (MVP):
- Shorthand pointers:
#id - resolves to the first element that has an attribute
idequal toid
Future phases (not yet implemented):
xpointer(...)schemeelement(...)scheme (implemented)- Namespace-aware ID matching and integration with DTD ID typing
enum XPointerKind
Types 3
enumXPointerKind
XPointer kind.
SHORTHANDShorthand pointer of the form `#id`.
ELEMENT`element(...)` scheme.
XPOINTER`xpointer(...)` scheme (XPath-backed).
XMLNS`xmlns(...)` scheme (namespace binding).
structXPointerPart
A single part of an XPointer (either a scheme or a shorthand).
Fields
XPointerKind kindstring idstring elementIdbool elementAbsolutesize_t[] elementSequencestring xpathstring xmlnsPrefixstring xmlnsUristructXPointer
Parsed XPointer.
Fields
XPointerPart[] partsPointer parts in order.Methods
XmlNode[] evaluate(XmlDocument doc, Options options = Options.init) @safeEvaluates this pointer against a document.Nested Templates
OptionsEvaluation strictness options.