Package com.metreeca.xml.actions
Class XPath<R>
java.lang.Object
com.metreeca.xml.actions.XPath<R>
- Type Parameters:
R
- the type of the value returned by the processing action
XPath-based XML node processing.
Maps XML nodes to values produced by a function taking as argument a node-targeted XPath processor.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The prefix mapped to the default namespace of the target document ("_"). -
Constructor Summary
ConstructorDescriptionXPath
(Function<XPath.Processor, R> query) Creates an XPath-based node processing action. -
Method Summary
-
Field Details
-
DefaultPrefix
The prefix mapped to the default namespace of the target document ("_").- See Also:
-
-
Constructor Details
-
XPath
Creates an XPath-based node processing action.- Parameters:
query
- a function taking as argument a processor and returning a value- Throws:
NullPointerException
- ifquery
is null
-
-
Method Details
-
decode
Decodes XML numeric entities.- Parameters:
text
- the text to be decoded- Returns:
- a version of
text
where XML numeric entities (for instance’
or“
) are replaced with the corresponding Unicode characters - Throws:
NullPointerException
- iftext
is null
-
apply
-