|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.vaidya.util.XMLUtils
public class XMLUtils
Sample Utility class to work with DOM document
Constructor Summary | |
---|---|
XMLUtils()
|
Method Summary | |
---|---|
static int |
countByTagName(String tag,
Document document)
Count Elements in Document by Tag Name |
static String |
getElementValue(String elementName,
Element element)
|
static Document |
parse(InputStream fs)
Parse the XML file and create Document |
static void |
printDOM(Node node)
Prints the specified node, then prints all of its children. |
static void |
writeXmlToFile(String filename,
Document document)
This method writes a DOM document to a file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLUtils()
Method Detail |
---|
public static void printDOM(Node node)
public static String getElementValue(String elementName, Element element) throws Exception
Exception
public static Document parse(InputStream fs)
public static void writeXmlToFile(String filename, Document document)
filename
- document
- public static int countByTagName(String tag, Document document)
tag
- document
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |