public class XmlParserImpl extends Object implements AutoCloseable, XmlParser
Constructor and Description |
---|
XmlParserImpl(File xmlFile,
Properties xmlProperties,
DocumentBuilder docBuilder,
Transformer transformer) |
Modifier and Type | Method and Description |
---|---|
boolean |
addChildNodes(XPathExpression expression,
Collection<Node> nodes) |
void |
close() |
Element |
createElement(String tagName) |
void |
flush() |
Map<String,String> |
getAttributes(XPathExpression elementExpression) |
boolean |
hasMatchingChild(XPathExpression parentExpression,
Node child) |
boolean |
hasNode(XPathExpression expression) |
Element |
importElement(Element element,
boolean deep) |
boolean |
isOpen() |
boolean |
matches(XPathExpression expression,
Node node) |
void |
open() |
boolean |
removeChildNode(XPathExpression parentExpression,
Node child) |
boolean |
removeNode(XPathExpression expression) |
boolean |
replaceNode(XPathExpression expression,
Node replacement) |
public XmlParserImpl(File xmlFile, Properties xmlProperties, DocumentBuilder docBuilder, Transformer transformer)
public void open() throws SAXException, IOException
open
in interface XmlParser
SAXException
IOException
public void close() throws TransformerException
close
in interface AutoCloseable
close
in interface XmlParser
TransformerException
public void flush() throws TransformerException
flush
in interface XmlParser
TransformerException
public boolean addChildNodes(XPathExpression expression, Collection<Node> nodes) throws XPathExpressionException
addChildNodes
in interface XmlParser
XPathExpressionException
public boolean replaceNode(XPathExpression expression, Node replacement) throws XPathExpressionException
replaceNode
in interface XmlParser
XPathExpressionException
public Element createElement(String tagName)
createElement
in interface ElementFactory
public Element importElement(Element element, boolean deep)
importElement
in interface ElementFactory
public boolean hasMatchingChild(XPathExpression parentExpression, Node child) throws XPathExpressionException
hasMatchingChild
in interface XmlParser
XPathExpressionException
public boolean hasNode(XPathExpression expression) throws XPathExpressionException
hasNode
in interface XmlParser
XPathExpressionException
public boolean matches(XPathExpression expression, Node node) throws XPathExpressionException
matches
in interface XmlParser
XPathExpressionException
public boolean removeNode(XPathExpression expression) throws XPathExpressionException
removeNode
in interface XmlParser
XPathExpressionException
public boolean removeChildNode(XPathExpression parentExpression, Node child) throws XPathExpressionException
removeChildNode
in interface XmlParser
XPathExpressionException
public Map<String,String> getAttributes(XPathExpression elementExpression) throws XPathExpressionException
getAttributes
in interface XmlParser
XPathExpressionException
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.