public class XmlBuilder
extends java.lang.Object
Constructor | Description |
---|---|
XmlBuilder() |
|
XmlBuilder(javax.xml.namespace.NamespaceContext namespaceContext) |
Modifier and Type | Method | Description |
---|---|---|
<T> T |
build(T xml) |
Evaluates collected XPath effects on a given XML model object.
|
XmlBuilder |
put(java.lang.String xpath) |
Greedily creates all missing nodes that could be evaluated by given XPath expression.
|
XmlBuilder |
put(java.lang.String xpath,
java.lang.Object value) |
Greedily creates all missing nodes that could be evaluated by given XPath expression and then sets given
value as text content to all evaluated nodes.
|
XmlBuilder |
putAll(java.lang.Iterable<java.lang.String> xpaths) |
Greedily creates all missing nodes that could be evaluated by given XPath expressions.
|
XmlBuilder |
putAll(java.lang.String... xpaths) |
Greedily creates all missing nodes that could be evaluated by given XPath expressions.
|
XmlBuilder |
putAll(java.util.Map<java.lang.String,java.lang.Object> xpathToValueMap) |
Greedily creates all missing nodes that could be evaluated by given XPath expressions and then sets the
associated value as text content to all evaluated nodes.
|
XmlBuilder |
remove(java.lang.String xpath) |
Evaluates given XPath expression and detaches all of the resulting nodes.
|
XmlBuilder |
removeAll(java.lang.Iterable<java.lang.String> xpaths) |
Evaluates given XPath expressions and detaches all of the resulting nodes.
|
XmlBuilder |
removeAll(java.lang.String... xpaths) |
Evaluates given XPath expressions and detaches all of the resulting nodes.
|
public XmlBuilder()
public XmlBuilder(javax.xml.namespace.NamespaceContext namespaceContext)
public XmlBuilder put(java.lang.String xpath) throws javax.xml.xpath.XPathExpressionException
xpath
- XPath to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedputAll(Iterable)
public XmlBuilder put(java.lang.String xpath, java.lang.Object value) throws javax.xml.xpath.XPathExpressionException
xpath
- XPath to processvalue
- value to setXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedputAll(Map)
public XmlBuilder putAll(java.lang.String... xpaths) throws javax.xml.xpath.XPathExpressionException
xpaths
- XPaths to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedputAll(Iterable)
public XmlBuilder putAll(java.lang.Iterable<java.lang.String> xpaths) throws javax.xml.xpath.XPathExpressionException
xpaths
- XPaths to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedput(String)
,
putAll(String...)
public XmlBuilder putAll(java.util.Map<java.lang.String,java.lang.Object> xpathToValueMap) throws javax.xml.xpath.XPathExpressionException
xpathToValueMap
- XPath to values associationsXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedput(String, Object)
public XmlBuilder remove(java.lang.String xpath) throws javax.xml.xpath.XPathExpressionException
xpath
- XPath to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedremoveAll(Iterable)
public XmlBuilder removeAll(java.lang.String... xpaths) throws javax.xml.xpath.XPathExpressionException
xpaths
- XPaths to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedremoveAll(Iterable)
public XmlBuilder removeAll(java.lang.Iterable<java.lang.String> xpaths) throws javax.xml.xpath.XPathExpressionException
xpaths
- XPaths to processXmlBuilder
instancejavax.xml.xpath.XPathExpressionException
- if xpath cannot be parsedremove(String)
,
removeAll(String...)
public <T> T build(T xml) throws XmlBuilderException
T
- XML model typexml
- XML to processXmlBuilderException
- if XML model modification failed