|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.bea.b2b.rosettanet.util.XmlProcessor
This class is a helper to read and update an XML template or message. The XML template or message is represented internally as a DOM Document. The methods are invoked from the example workflows's business operations.
Constructor Summary | |
XmlProcessor()
|
Method Summary | |
boolean |
exist(java.lang.String elementType)
Check to see if a node exists in the internally stored DOM Document. |
org.w3c.dom.Document |
getDoc()
Return the internal DOM Document |
java.lang.String |
getElementContent(java.lang.String elementType)
Obtain the content for an element in the internally stored DOM Document. |
java.lang.String |
getXml()
Method that returns the internally stored DOM Document as a String. |
org.w3c.dom.Node |
searchDOMNode(java.lang.String name,
org.w3c.dom.Node root,
long elementIndex)
A method that searchs (recursively) the internal DOM Document for a specific element. |
void |
setDoc(org.w3c.dom.Document indoc)
Assign the internal DOM Document to the one passed in |
void |
setElementContent(java.lang.String elementType,
java.lang.String elementContent)
Update the content for an element type in the internally stored DOM Document. |
void |
setXml(java.lang.String xml)
Assign a String version of the XML document. |
void |
setXmlFile(java.lang.String filename)
Assign an XML file. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public XmlProcessor()
Method Detail |
public org.w3c.dom.Document getDoc()
public void setDoc(org.w3c.dom.Document indoc)
indoc
- a DOM Document to assign to the internal DOM Documentpublic void setXmlFile(java.lang.String filename) throws java.io.IOException, org.xml.sax.SAXException
filename
- name of the XML file to be parsedpublic void setXml(java.lang.String xml) throws java.io.IOException, org.xml.sax.SAXException
xml
- an XML document in a String formatpublic java.lang.String getXml() throws java.io.IOException
public boolean exist(java.lang.String elementType)
elementType
- the full path of the element in the DOM Documentpublic java.lang.String getElementContent(java.lang.String elementType)
elementType
- the full path of the element in the DOM Documentpublic void setElementContent(java.lang.String elementType, java.lang.String elementContent)
elementType
- the full path of the element in the DOM DocumentelementContent
- the value for the elementpublic org.w3c.dom.Node searchDOMNode(java.lang.String name, org.w3c.dom.Node root, long elementIndex)
name
- name of the elementroot
- the starting root of the current position in the DOM DocumentelementIndex
- the current index of the element
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |