Package org.apache.nutch.util
Class DomUtil
- java.lang.Object
-
- org.apache.nutch.util.DomUtil
-
public class DomUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description DomUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ElementgetDom(InputStream is)Returns parsed dom tree or null if any errorstatic voidsaveDom(OutputStream os, DocumentFragment doc)Save dom intoOutputStreamstatic voidsaveDom(OutputStream os, Element e)Save dom intoOutputStream
-
-
-
Method Detail
-
getDom
public static Element getDom(InputStream is)
Returns parsed dom tree or null if any error- Parameters:
is- XMLInputStream- Returns:
- A parsed DOM tree from the given
InputStream.
-
saveDom
public static void saveDom(OutputStream os, Element e)
Save dom intoOutputStream- Parameters:
os- Output DOM XML stream to save toe- A specific DOMElementto save
-
saveDom
public static void saveDom(OutputStream os, DocumentFragment doc)
Save dom intoOutputStream- Parameters:
os- Output DOM XML stream to save todoc- A specific DOMDocumentFragmentto save
-
-