Class XPathReplacer
java.lang.Object
com.google.code.maven_replacer_plugin.XPathReplacer
- All Implemented Interfaces:
Replacer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DocumentBuilder
private final TokenReplacer
private final Transformer
private final XPath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
convertNodeToString
(Node replacementTarget) private Node
convertXmlToNode
(String xml) private NodeList
findReplacementNodes
(Document doc, String xpathString) private Document
replace
(String content, Replacement replacement, boolean regex, int regexFlags) private void
replaceContent
(NodeList replacementNodes, Replacement replacement, boolean regex, int regexFlags) private String
-
Field Details
-
tokenReplacer
-
docBuilder
-
xpath
-
transformer
-
-
Constructor Details
-
XPathReplacer
-
-
Method Details
-
replace
-
replaceContent
private void replaceContent(NodeList replacementNodes, Replacement replacement, boolean regex, int regexFlags) throws Exception - Throws:
Exception
-
parseXml
- Throws:
Exception
-
findReplacementNodes
- Throws:
Exception
-
convertNodeToString
- Throws:
TransformerException
-
convertXmlToNode
- Throws:
Exception
-
writeXml
- Throws:
Exception
-