|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bibalex.daf.handlers.xmlhandler.XmlHandler
public class XmlHandler
This class performs XML related tasks, such as:
Getting a specific node using XPath.
Converting a Node into a String.
| Field Summary | |
|---|---|
private javax.xml.xpath.XPath |
xpath
Holds the XPath used to execute queries. |
| Constructor Summary | |
|---|---|
XmlHandler()
Initilaizes a new insatcne of XmlHandler. |
|
| Method Summary | |
|---|---|
static java.lang.String |
convertNode(org.w3c.dom.Node node)
Converts the given xml node into a String. |
static java.lang.String |
encode(java.lang.String xml)
Encodes the given String to be in a valid XML format. This method replaces the follwoing characters: Char Replacement & & < < > > ' ' " " |
org.w3c.dom.Node |
getNode(org.w3c.dom.Node node,
java.lang.String query)
Gets the node specified by the given query. |
org.w3c.dom.NodeList |
getNodes(org.w3c.dom.Node node,
java.lang.String query)
Gets the nodes specified by the given query. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private javax.xml.xpath.XPath xpath
| Constructor Detail |
|---|
public XmlHandler()
| Method Detail |
|---|
public org.w3c.dom.Node getNode(org.w3c.dom.Node node,
java.lang.String query)
node - The Node on whose the XPath will be executed.query - The XPath query to execute.
public org.w3c.dom.NodeList getNodes(org.w3c.dom.Node node,
java.lang.String query)
node - The Node on whose the XPath will be executed.query - The XPath query to execute.
public static java.lang.String convertNode(org.w3c.dom.Node node)
node - The node to convert into string.
public static java.lang.String encode(java.lang.String xml)
xml - The String to encode.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||