|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectname.alessiosaltarin.utils.DOMUtils
public class DOMUtils
This class provides basic operations with XML files using DOM.
Constructor Summary | |
---|---|
DOMUtils()
|
Method Summary | |
---|---|
static int |
countByTagName(java.lang.String tag,
org.w3c.dom.Document document)
Count Elements in Document by Tag Name |
static org.w3c.dom.Document |
parse(java.io.File xmlfile)
Parse the XML file and create Document |
static org.w3c.dom.Document |
parse(java.io.File xmlfile,
boolean namespaceAware)
Parse the XML file and create Document |
static void |
printNode(org.w3c.dom.Node node)
Provides a representation of XML to stdout. |
static void |
writeDomToFile(java.lang.String filename,
org.w3c.dom.Document document)
This method writes a DOM document to a file |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DOMUtils()
Method Detail |
---|
public static void printNode(org.w3c.dom.Node node)
node
- It can be a document, an element, an entity, CDATA, text.public static org.w3c.dom.Document parse(java.io.File xmlfile, boolean namespaceAware)
xmlfile
- Path to XML filenamespaceAware
- The parser must parse namespaces too
Document
public static org.w3c.dom.Document parse(java.io.File xmlfile)
xmlfile
- XML file to parse
public static void writeDomToFile(java.lang.String filename, org.w3c.dom.Document document)
filename
- document
- public static int countByTagName(java.lang.String tag, org.w3c.dom.Document document)
tag
- document
-
|
Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |