|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.oclc.da.gdfr.registryprototype.pvt.dbxml.XPathEvaluator
public class XPathEvaluator
| Constructor Summary | |
|---|---|
XPathEvaluator(java.lang.String xml)
|
|
| Method Summary | |
|---|---|
java.lang.String |
addComplexValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
Appends a new complex value to the node at the given path |
void |
addNamespaces(java.lang.String xml)
Adds any new namespaces found in the given xml to this objects properties |
java.lang.String |
addSimpleValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
Appends a simple value to the given XML |
java.lang.String |
addTextValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
Adds/Updates a text node with the given value at the given path |
com.sleepycat.dbxml.XmlQueryContext |
createQueryContext(com.sleepycat.dbxml.XmlQueryContext qContext)
Puts all known namespace prefix/uri pairs into an XmlQueryContext Object |
java.lang.String[] |
findValueInContent(java.lang.String content,
java.lang.String path)
Finds a value in an Xml String and returns it |
java.lang.String |
getNamespaceFromPrefix(java.lang.String prefix)
Returns the namespace URI for the given Prefix |
java.lang.String |
removeValueFromContent(java.lang.String content,
java.lang.String path,
boolean removeElem)
Removes a text value from the given content |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XPathEvaluator(java.lang.String xml)
| Method Detail |
|---|
public void addNamespaces(java.lang.String xml)
xml -
public java.lang.String addComplexValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
content - The original XML documentpath - The XPath to followvalue - The new value to add.
RegistryException
public java.lang.String addSimpleValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
content - The XML to add to. Note, this MUST contain the node that is
addressed by the XPath providedpath - The XPath to reach the elementvalue - The value to assign. This should NOT contain the element that
is directly referred to by the XPath
public java.lang.String addTextValueToContent(java.lang.String content,
java.lang.String path,
java.lang.String value)
content - String representing the XML documentpath - The XPath leading to the simple element containing the text nodevalue - The text value to addpublic com.sleepycat.dbxml.XmlQueryContext createQueryContext(com.sleepycat.dbxml.XmlQueryContext qContext)
qContext -
public java.lang.String[] findValueInContent(java.lang.String content,
java.lang.String path)
content - The Xml String to look atpath - The XPath expression to the location of the value
javax.xml.xpath.XPathExpressionException - If the XPath is invalidpublic java.lang.String getNamespaceFromPrefix(java.lang.String prefix)
prefix -
public java.lang.String removeValueFromContent(java.lang.String content,
java.lang.String path,
boolean removeElem)
content - The XML document to usepath - The XPath to reach the text to removeremoveElem - If true, element and contents are removed.
If false, only contents are erased.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||