|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunbbayes.util.XMLUtil
public class XMLUtil
This class is a XML utility class. It requires two Apache Java modules: -- Xerces (Java XML parsers) -- Xalan (XSLT stylesheet processors).
Method Summary | |
---|---|
static Document |
createDocument()
creates a new empty DOM document. |
static Document |
getDocument(InputSource poInputSource)
returns an XML DOM object. |
static Document |
getDocument(String poStringInput)
returns an XML DOM object. |
static Element |
getElement(Document pDocument,
String psTagName,
int index)
returns a XML element. |
static NodeList |
getNodeList(Document pDocument,
String psTagName)
returns a XML node list. |
static Node |
getNodeTree(Document poDocument,
String xPath)
Create a new node tree based on a node tree |
static int |
getSize(Document pDocument,
String psTagName)
returns a XML node size. |
static String |
getValue(Document pDocument,
String psTagName)
returns a XML node value. |
static String |
getValue(Element pElement)
returns a XML element value. |
static String |
getValue(Node pNode)
returns a XML node value. |
static String |
getXML(Document pDocument)
returns an XML string. |
static String |
getXML(Node pNode)
returns an XML string. |
static void |
insertNode(Document poDocument,
Node poNode,
Node poNodeToInsert)
Insert a node into the document. |
static void |
insertNode(Document poDocument,
Node poNode,
Node poNodeToInsert,
boolean pbFlag)
Insert a node into the document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Document getDocument(String poStringInput) throws Exception
poStringInput
- String XML string input
Exception
public static Document getDocument(InputSource poInputSource) throws Exception
poInputSource
- InputSource XML string stream input
Exception
public static String getXML(Document pDocument) throws Exception
pDocument
- Document XML DOM document
Exception
public static String getXML(Node pNode)
pNode
- Node XML Document node
public static NodeList getNodeList(Document pDocument, String psTagName)
pDocument
- Document XML DOM documentpsTagName
- String XML node name
public static Element getElement(Document pDocument, String psTagName, int index)
pDocument
- Document XML DOM documentpsTagName
- String XML node nameindex
- int XML node position
public static int getSize(Document pDocument, String psTagName)
pDocument
- Document XML DOM documentpsTagName
- String XML node name
public static String getValue(Document pDocument, String psTagName) throws Exception
pDocument
- Document XML DOM documentpsTagName
- String XML node name
Exception
public static String getValue(Element pElement) throws Exception
pElement
- Document XML element
Exception
public static String getValue(Node pNode) throws Exception
pNode
- Document XML node
Exception
public static Document createDocument()
public static Node getNodeTree(Document poDocument, String xPath)
poDocument
- Source Document XMLxPath
- the XPATH
public static void insertNode(Document poDocument, Node poNode, Node poNodeToInsert, boolean pbFlag)
poDocument
- Source Document XMLpoNode
- Node where the new node is going to be inserted intopoNodeToInsert
- Node to be inserted intopbFlag
- Flag to indicate if poNodeToInsert is created by document poDocumentpublic static void insertNode(Document poDocument, Node poNode, Node poNodeToInsert)
poDocument
- Source Document XMLpoNode
- Node where the new node is going to be inserted intopoNodeToInsert
- Node to be inserted into
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |