org.jsoup.helper
Class W3CDom
java.lang.Object
org.jsoup.helper.W3CDom
public class W3CDom
- extends Object
Helper class to transform a Document to a org.w3c.dom.Document,
for integration with toolsets that use the W3C DOM.
This class is currently experimental, please provide feedback on utility and any problems experienced.
|
Nested Class Summary |
protected class |
W3CDom.W3CBuilder
Implements the conversion by walking the input. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
factory
protected DocumentBuilderFactory factory
W3CDom
public W3CDom()
fromJsoup
public 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,
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 String asString(Document doc)
- Serialize a W3C document to a String.
- Parameters:
doc - Document
- Returns:
- Document as string
Copyright © 2009-2015 Jonathan Hedley. All Rights Reserved.