|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.gpt.framework.xml.DomUtil
public class DomUtil
XML Document utility functions.
Method Summary | |
---|---|
static Node[] |
findChildren(Node parent,
String childTagName)
Finds the children of a parent node matching the supplied child tag name. |
static Node |
findFirst(Node parent,
String childTagName)
Finds the first child of a parent node based upon the supplied tag name for the child. |
static String |
getAttributeValue(NamedNodeMap nnm,
String name)
Returns an attribute value from a NamedNodeMap. |
static String |
getTextContent(Node parentNode)
Returns the text node content associated with a parent node. |
static Document |
makeDomFromResourcePath(String path,
boolean namespaceAware)
Makes an XML document associated with a specified resource. |
static Document |
makeDomFromSource(InputSource src,
boolean namespaceAware)
Makes an XML document based upon an input source. |
static Document |
makeDomFromString(String xml,
boolean namespaceAware)
Makes an XML document from an XML string. |
static Document |
newDocument()
Creates an empty XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String getAttributeValue(NamedNodeMap nnm, String name)
nnm
- the NamedNodeMap of attributesname
- the name of the attribute to retrieve
public static String getTextContent(Node parentNode)
parentNode
- the parent node for which text will be extracted
public static Node[] findChildren(Node parent, String childTagName)
parent
- the parent containing the children to findchildTagName
- the tag name of the child to find
public static Node findFirst(Node parent, String childTagName)
parent
- the parent of the child node to findchildTagName
- the tag name for the node to find
public static Document makeDomFromResourcePath(String path, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException
path
- the path for the resource (relative to WEB-INF/classes)namespaceAware
- true if the Document should be namespace aware.
ParserConfigurationException
- if a configuration exception occurs
SAXException
- if an exception occurs during XML parsing
IOException
- if an i/o exception occurspublic static Document makeDomFromSource(InputSource src, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException
src
- the InputSourcenamespaceAware
- true if the Document should be namespace aware
ParserConfigurationException
- if a configuration exception occurs
SAXException
- if an exception occurs during XML parsing
IOException
- if an i/o exception occurspublic static Document makeDomFromString(String xml, boolean namespaceAware) throws ParserConfigurationException, SAXException, IOException
xml
- the xml stringnamespaceAware
- true if the Document should be namespace aware.
ParserConfigurationException
- if a configuration exception occurs
SAXException
- if an exception occurs during XML parsing
IOException
- if an i/o exception occurspublic static Document newDocument() throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
- if a configuration exception occurs
SAXException
- if an exception occurs during XML parsing
IOException
- if an i/o exception occurs
|
Esri Geoportal Server 1.0
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |