|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.cutruzzula.lgml.util.DOMUtils
public class DOMUtils
XML utility methods
Method Summary | |
---|---|
static org.w3c.dom.Document |
buildDocument(byte[] buffer)
Method to build a DOM document from a byte array. |
static org.w3c.dom.Document |
buildDocument(java.io.InputStream is)
Method to build a DOM document from an input stream. |
static java.lang.String |
getAttributeValue(org.w3c.dom.Node node,
java.lang.String attributeName)
Method to get node attribute value with provided name, if present. |
static java.util.List<org.w3c.dom.Node> |
getChildElements(org.w3c.dom.Node node)
Method to get the input node children of type "ELEMENT". |
static java.util.List<org.w3c.dom.Node> |
getChildElements(org.w3c.dom.Node node,
java.lang.String localName)
Method to get the input node children of type "ELEMENT" with provided local name. |
static org.w3c.dom.Node |
getFirstChildElement(org.w3c.dom.Node node)
Method to get the first input node's child of type "ELEMENT", if present. |
static org.w3c.dom.Node |
getFirstChildElement(org.w3c.dom.Node node,
java.lang.String localName)
Method to get the first input node child of type "ELEMENT" with provided local name, if present. |
static java.lang.String |
getNodeLocalName(org.w3c.dom.Node node)
Method to get node local name (example "name" for "ns1:name"). |
static java.lang.String |
getNodeTextValue(org.w3c.dom.Node node)
Method to get node text value, if found. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static org.w3c.dom.Document buildDocument(byte[] buffer) throws java.lang.Exception
buffer
- The input byte array
java.lang.Exception
public static org.w3c.dom.Document buildDocument(java.io.InputStream is) throws java.lang.Exception
is
- The input stream
java.lang.Exception
public static org.w3c.dom.Node getFirstChildElement(org.w3c.dom.Node node)
node
- The org.w3c.dom.Node input Node
public static org.w3c.dom.Node getFirstChildElement(org.w3c.dom.Node node, java.lang.String localName)
node
- The org.w3c.dom.Node input NodelocalName
- The local name to be searched
public static java.util.List<org.w3c.dom.Node> getChildElements(org.w3c.dom.Node node)
node
- The org.w3c.dom.Node input Node
public static java.util.List<org.w3c.dom.Node> getChildElements(org.w3c.dom.Node node, java.lang.String localName)
node
- The org.w3c.dom.Node input NodelocalName
- The local name to be searched
public static java.lang.String getNodeLocalName(org.w3c.dom.Node node)
node
- The org.w3c.dom.Node input Node
public static java.lang.String getNodeTextValue(org.w3c.dom.Node node)
node
- The org.w3c.dom.Node input Node
public static java.lang.String getAttributeValue(org.w3c.dom.Node node, java.lang.String attributeName)
node
- The org.w3c.dom.Node input NodeattributeName
- The attribute to search
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |