Class XmlUtil
java.lang.Object
net.sf.jailer.xml.XmlUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRemoves invalid char from element names.static StringGenerates a XML string from DOM.static StringbuildOmitDeclaration(Document xmlDocument) Generates a XML string from DOM without XML declaration.createObjectNotationTransformerHandler(String commentHeader, String rootTag, Writer out, boolean forSketch, ScriptFormat scriptFormat, SimpleDateFormat datePattern, SimpleDateFormat timestampPattern, ExecutionContext executionContext) static TransformerHandlercreateTransformerHandler(String commentHeader, String rootTag, StreamResult streamResult, Charset charset, ExecutionContext executionContext) Creates aTransformerHandler.static DocumentParses a XML document.static voidvisitDocumentNodes(Document document, NodeVisitor visitor) Visits the nodes ofDocument.
-
Field Details
-
NS_URI
-
NS_PREFIX
-
ASSOCIATION_TAG
-
SQL_PREFIX
-
-
Constructor Details
-
XmlUtil
public XmlUtil()
-
-
Method Details
-
parse
public static Document parse(String xml) throws ParserConfigurationException, SAXException, IOException Parses a XML document.- Parameters:
xml- the XML document- Returns:
- DOM
- Throws:
ParserConfigurationExceptionSAXExceptionIOException
-
buildOmitDeclaration
Generates a XML string from DOM without XML declaration.- Parameters:
xmlDocument- the DOM- Returns:
- XML string
- Throws:
TransformerException
-
build
Generates a XML string from DOM.- Parameters:
xmlDocument- the DOM- Returns:
- XML string
- Throws:
TransformerException
-
asElementName
-
visitDocumentNodes
Visits the nodes ofDocument.- Parameters:
document- the documentvisitor- the visitor
-
createTransformerHandler
public static TransformerHandler createTransformerHandler(String commentHeader, String rootTag, StreamResult streamResult, Charset charset, ExecutionContext executionContext) throws SAXException Creates aTransformerHandler.- Parameters:
commentHeader- the comment headerrootTag- the root tagstreamResult- stream resultexecutionContext-- Throws:
SAXException
-
createObjectNotationTransformerHandler
public static XmlUtil.ObjectNotationTransformerHandler createObjectNotationTransformerHandler(String commentHeader, String rootTag, Writer out, boolean forSketch, ScriptFormat scriptFormat, SimpleDateFormat datePattern, SimpleDateFormat timestampPattern, ExecutionContext executionContext)
-