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 Element
getDom(InputStream is)
Returns parsed dom tree or null if any errorstatic void
saveDom(OutputStream os, DocumentFragment doc)
Save dom intoOutputStream
static void
saveDom(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 DOMElement
to save
-
saveDom
public static void saveDom(OutputStream os, DocumentFragment doc)
Save dom intoOutputStream
- Parameters:
os
- Output DOM XML stream to save todoc
- A specific DOMDocumentFragment
to save
-
-