|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.globus.ogsa.impl.base.servicegroup.common.XMLUtil
XML Utilities class.
| Constructor Summary | |
XMLUtil()
|
|
| Method Summary | |
static java.lang.String |
denormalize(java.lang.String anXMLAttrValue)
Denormalizes a string containing XML attribute name/value pairs. |
static java.lang.String |
docToString(org.w3c.dom.Document aDoc)
Converts XML from a Document to a String |
static java.lang.String |
elementToString(org.w3c.dom.Element anElement)
Converts an XML Element to String representation. |
static java.lang.String |
getElementValue(org.w3c.dom.Element anElement)
Gets the value of an Element in String representation. |
static org.w3c.dom.Node |
getNode(org.w3c.dom.Node aParentNode,
java.lang.String anXPath)
Applies an XPath query to a Node, returns the result as a Node. |
static org.w3c.dom.Node |
getNSNode(java.util.HashMap namespaceMap)
Creates a Node containing all of the namespaces contained in a HashMap. |
static org.w3c.dom.Document |
load(java.lang.String aFilePath)
Loads the contents of a file into an XML Document |
static void |
removeElementValue(org.w3c.dom.Element anElement)
Strips child Nodes from an Element. |
static void |
save(java.lang.String aFilePath,
org.w3c.dom.Document aDocument)
Writes an XML Document to a file. |
static void |
setElementValue(org.w3c.dom.Element anElement,
java.lang.String anElementValue)
Sets the value of an Element |
static org.w3c.dom.Document |
stringToDoc(java.lang.String anXMLDocInStringFormat)
Creates a Document from an XML document in String format. |
| 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 static void setElementValue(org.w3c.dom.Element anElement,
java.lang.String anElementValue)
throws org.w3c.dom.DOMException
anElement - - the Element whose value may change.anElementValue - - value to apply to the Elem
org.w3c.dom.DOMException
public static java.lang.String getElementValue(org.w3c.dom.Element anElement)
throws org.w3c.dom.DOMException
anElement - - the Element to process
org.w3c.dom.DOMException
public static void removeElementValue(org.w3c.dom.Element anElement)
throws org.w3c.dom.DOMException
anElement - - the Element to process
org.w3c.dom.DOMException
public static org.w3c.dom.Node getNode(org.w3c.dom.Node aParentNode,
java.lang.String anXPath)
throws javax.xml.transform.TransformerException
aParentNode - - parent Node to query againstanXPath - - the XPath query string
javax.xml.transform.TransformerException
public static java.lang.String elementToString(org.w3c.dom.Element anElement)
throws java.io.IOException
anElement - - the input Element for conversion to String
java.io.IOException
public static java.lang.String docToString(org.w3c.dom.Document aDoc)
throws java.io.IOException
aDoc - - the XML Document to convert
java.io.IOException
public static org.w3c.dom.Document load(java.lang.String aFilePath)
throws java.io.FileNotFoundException,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
aFilePath - - the filepath to load.
java.io.FileNotFoundException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
public static void save(java.lang.String aFilePath,
org.w3c.dom.Document aDocument)
throws java.io.IOException
aFilePath - - the filepath of the output fileaDocument - - the XML document to save
java.io.IOException
public static org.w3c.dom.Document stringToDoc(java.lang.String anXMLDocInStringFormat)
throws java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
anXMLDocInStringFormat - - the XML document in String format.
java.io.IOException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXExceptionpublic static java.lang.String denormalize(java.lang.String anXMLAttrValue)
anXMLAttrValue - - the XML attribute values
org.w3c.dom.DOMExceptionpublic static org.w3c.dom.Node getNSNode(java.util.HashMap namespaceMap)
namespaceMap - - the namespace Map
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||