Class JkDomDocument
java.lang.Object
dev.jeka.core.api.marshalling.xml.JkDomDocument
Borrowed from VincerDom https://github.com/djeang/vincer-dom
Wrapper for
Document offering a Parent-Chaining fluent interface.-
Method Summary
Modifier and TypeMethodDescriptionReturns thd underlying w3cDocument.static JkDomDocumentCreates a document with a root element of the specified name.static JkDomDocumentCreates aJkDomDocumentwrapping the specified w3c document.static JkDomDocumentparse(InputStream inputStream) Same asparse(InputStream, DocumentBuilder)but using a defaultDocumentBuilder.static JkDomDocumentparse(InputStream inputStream, DocumentBuilder documentBuilder) Creates aJkDomDocumentby parsing the content of specified input stream.static JkDomDocumentstatic JkDomDocumentCreates aJkDomDocumentfrom the specified xml file.voidprint(OutputStream out) Outputs xml in the specified stream.voidprint(OutputStream out, Consumer<DOMConfiguration> domConfigurationConfigurer) Same asprint(OutputStream)but caller can modify the default XML transformer using the specifiedConsumer<Transformer>.root()Returns the root element of this document.voidSaves this document in the specified file.toXml()Returns an XML String representation of this document.
-
Method Details
-
of
Creates aJkDomDocumentwrapping the specified w3c document. -
of
Creates a document with a root element of the specified name. -
parse
Creates aJkDomDocumentby parsing the content of specified input stream. The stream content is parsed with the specified documentBuilder. -
parse
Same asparse(InputStream, DocumentBuilder)but using a defaultDocumentBuilder. -
parse
-
parse
Creates aJkDomDocumentfrom the specified xml file. -
getW3cDocument
Returns thd underlying w3cDocument. -
root
Returns the root element of this document. -
print
Outputs xml in the specified stream. -
save
Saves this document in the specified file. -
print
Same asprint(OutputStream)but caller can modify the default XML transformer using the specifiedConsumer<Transformer>. -
toXml
Returns an XML String representation of this document.
-