Package org.jsoup.helper
Class W3CDom
- java.lang.Object
-
- org.jsoup.helper.W3CDom
-
public class W3CDom extends java.lang.ObjectHelper class to transform aDocumentto aorg.w3c.dom.Document, for integration with toolsets that use the W3C DOM.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classW3CDom.W3CBuilderImplements the conversion by walking the input.
-
Field Summary
Fields Modifier and Type Field Description protected javax.xml.parsers.DocumentBuilderFactoryfactory
-
Constructor Summary
Constructors Constructor Description W3CDom()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringasString(org.w3c.dom.Document doc)Serialize a W3C document to a String.voidconvert(Document in, org.w3c.dom.Document out)Converts a jsoup document into the provided W3C Document.org.w3c.dom.DocumentfromJsoup(Document in)Convert a jsoup Document to a W3C Document.
-
-
-
Method Detail
-
fromJsoup
public org.w3c.dom.Document fromJsoup(Document in)
Convert a jsoup Document to a W3C Document.- Parameters:
in- jsoup doc- Returns:
- w3c doc
-
convert
public void convert(Document in, org.w3c.dom.Document out)
Converts a jsoup document into the provided W3C Document. If required, you can set options on the output document before converting.- Parameters:
in- jsoup docout- w3c doc- See Also:
fromJsoup(org.jsoup.nodes.Document)
-
asString
public java.lang.String asString(org.w3c.dom.Document doc)
Serialize a W3C document to a String.- Parameters:
doc- Document- Returns:
- Document as string
-
-