Add the PureXML.Pattern namespace: a compiler for the streamable XPath subset (names, *, prefix:*, /, //, leading absolute /, trailing @attr) into a Matcher, with predicates and . / .. rejected. The backward-matching algorithm tests an element's ancestor-or-self path. Pattern.matches(_:in:) streams a document through the pull parser and returns matching node paths in document order from the open-element stack alone, no tree built. Closes #44 Closes #45 Closes #22
30 lines
632 B
Swift
30 lines
632 B
Swift
/// Root namespace for the PureXML package.
|
|
public enum PureXML {
|
|
/// XML document model types.
|
|
public enum Model {}
|
|
|
|
/// XML parsing types.
|
|
public enum Parsing {}
|
|
|
|
/// XML emitting types.
|
|
public enum Emitting {}
|
|
|
|
/// XML typed decoding types.
|
|
public enum Decoding {}
|
|
|
|
/// XML typed encoding types.
|
|
public enum Encoding {}
|
|
|
|
/// XML validation types.
|
|
public enum Validation {}
|
|
|
|
/// XML stream types.
|
|
public enum Stream {}
|
|
|
|
/// XPath query types.
|
|
public enum XPath {}
|
|
|
|
/// Streaming pattern types (the libxml2 `pattern.h` XPath subset).
|
|
public enum Pattern {}
|
|
}
|