|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.manifoldcf.core.common.XMLDoc
public class XMLDoc
| Nested Class Summary | |
|---|---|
protected static class |
XMLDoc.MyEntityResolver
|
| Field Summary | |
|---|---|
static java.lang.String |
_rcsid
|
| Constructor Summary | |
|---|---|
XMLDoc()
Creates the empty doc |
|
XMLDoc(java.io.InputStream is)
Build a document object tree from an input stream |
|
XMLDoc(java.lang.String data)
Construct a new document tree from a string form of an xml document |
|
XMLDoc(java.lang.StringBuffer data)
Construct a new document tree from a stringbuffer form of an xml document |
|
XMLDoc(XMLDoc oldDoc,
java.lang.Object parent)
Construct a document from all the children of an existing element object from another document. |
|
| Method Summary | |
|---|---|
void |
addDocumentElement(java.lang.Object where,
XMLDoc oldDoc,
java.lang.Object parent)
Add the children of another document's node as the children of this node. |
java.lang.Object |
createElement(java.lang.Object who,
java.lang.String ename)
Create an element |
java.lang.Object |
createText(java.lang.Object who,
java.lang.String data)
Create a free-form data value (vs attribute value=) |
protected org.w3c.dom.Node |
duplicateNode(org.w3c.dom.Node node)
Make a (deep) copy of a node. |
java.util.ArrayList |
getAttributes(java.lang.Object n)
Extract the attribute names from the given node. |
java.lang.String |
getData(java.lang.Object obj)
Get TEXT element value as single string. |
protected java.lang.Object |
getDocument()
Return the document root; may be null |
java.lang.Object |
getElement(java.lang.Object parent,
java.lang.String tagname)
Return the first object to match tagname |
java.lang.String |
getNodeName(java.lang.Object el)
Return element name. |
java.lang.Object |
getRoot()
Return root node |
java.lang.Object |
getRoot(java.lang.Object obj)
Return root node |
java.lang.String |
getValue(java.lang.Object elo,
java.lang.String a)
Return the value of a named attribute |
java.lang.String |
getXML()
Serialize the document object to a safe string |
void |
processPath(java.util.ArrayList returnList,
java.lang.String path,
java.lang.Object currentRoot)
|
java.util.ArrayList |
processPath(java.lang.String path,
java.lang.Object o)
|
protected int |
searchArrayForAttribute(java.util.ArrayList l,
int i,
java.lang.String attribute,
java.lang.String value)
Having collected an arraylist from a given depth in the tree, scan the node for the current attribute specified (part of wildcard matching of xpath-like element specification) |
void |
setAttribute(java.lang.Object e,
java.lang.String sName,
java.lang.String sValue)
Set an attribute on an element |
protected void |
setDocument(java.lang.Object d)
|
byte[] |
toByteArray()
Convert the response for transmit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String _rcsid
| Constructor Detail |
|---|
public XMLDoc()
throws ManifoldCFException
ManifoldCFException
public XMLDoc(java.lang.String data)
throws ManifoldCFException
data - xml to parse
ManifoldCFException
public XMLDoc(java.lang.StringBuffer data)
throws ManifoldCFException
data - xml to parse
ManifoldCFException
public XMLDoc(java.io.InputStream is)
throws ManifoldCFException
is - InputStream of xml to parse
ManifoldCFException
public XMLDoc(XMLDoc oldDoc,
java.lang.Object parent)
throws ManifoldCFException
ManifoldCFException| Method Detail |
|---|
protected java.lang.Object getDocument()
protected void setDocument(java.lang.Object d)
public java.util.ArrayList processPath(java.lang.String path,
java.lang.Object o)
public void processPath(java.util.ArrayList returnList,
java.lang.String path,
java.lang.Object currentRoot)
protected int searchArrayForAttribute(java.util.ArrayList l,
int i,
java.lang.String attribute,
java.lang.String value)
l - list of elements foundi - starting indexattribute - String to findvalue - String attribute value to match
public java.lang.String getXML()
throws ManifoldCFException
ManifoldCFException
public byte[] toByteArray()
throws ManifoldCFException
ManifoldCFException
public final java.lang.String getValue(java.lang.Object elo,
java.lang.String a)
elo - Object to aska - String attribute to find
public final java.lang.String getNodeName(java.lang.Object el)
el - Object to ask
public final java.lang.String getData(java.lang.Object obj)
obj - Element to grab data
public java.lang.Object getRoot()
public java.lang.Object getRoot(java.lang.Object obj)
obj - Object document, might not be 'this'
public final java.util.ArrayList getAttributes(java.lang.Object n)
n - Object to ask
public java.lang.Object getElement(java.lang.Object parent,
java.lang.String tagname)
parent - Objecttagname - String nodename
public java.lang.Object createElement(java.lang.Object who,
java.lang.String ename)
who - Object parent Nodeename - String element name
public void addDocumentElement(java.lang.Object where,
XMLDoc oldDoc,
java.lang.Object parent)
public void setAttribute(java.lang.Object e,
java.lang.String sName,
java.lang.String sValue)
e - Object element to modifysName - String attribute namesValue - String attribute value
public java.lang.Object createText(java.lang.Object who,
java.lang.String data)
who - Objectdata - String text to add as cdata/textprotected org.w3c.dom.Node duplicateNode(org.w3c.dom.Node node)
node - is the node object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||