|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmage.util.XmlUtil
public class XmlUtil
Xml util class
| Constructor Summary | |
|---|---|
XmlUtil()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getAttribute(org.w3c.dom.Node node,
java.lang.String key)
Gets an attribute's value in an xml dom node |
org.w3c.dom.Node |
getNamedChildNode(org.w3c.dom.Node parentNode,
java.lang.String nodeName)
Gets a named child node under a parent node. |
org.w3c.dom.Document |
read(java.io.File file)
Read an xml document from file. |
org.w3c.dom.Document |
read(java.io.InputStream inputStream)
Read an xml document from input stream. |
void |
setAttribute(org.w3c.dom.Node node,
java.lang.String key,
java.lang.String value)
Sets an attribute in an xml dom node |
void |
write(org.w3c.dom.Document document,
java.io.File destFile)
Writes an xml 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 XmlUtil()
| Method Detail |
|---|
public void write(org.w3c.dom.Document document,
java.io.File destFile)
throws java.io.IOException
document - destFile -
java.io.IOException
public org.w3c.dom.Document read(java.io.File file)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
file - the file
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public org.w3c.dom.Document read(java.io.InputStream inputStream)
throws java.io.IOException,
org.xml.sax.SAXException,
javax.xml.parsers.ParserConfigurationException
inputStream - the input stream.
java.io.IOException
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
public void setAttribute(org.w3c.dom.Node node,
java.lang.String key,
java.lang.String value)
node - the nodekey - the attribute's namevalue - the attribute's value
public org.w3c.dom.Node getNamedChildNode(org.w3c.dom.Node parentNode,
java.lang.String nodeName)
throws java.util.NoSuchElementException
parentNode - nodeName -
java.util.NoSuchElementException
public java.lang.String getAttribute(org.w3c.dom.Node node,
java.lang.String key)
throws javax.naming.directory.NoSuchAttributeException
node - the nodekey - the attribute's name
javax.naming.directory.NoSuchAttributeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||