|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.fujitsu.xml.omquery.OmQueryMgrBase
com.fujitsu.xml.omquery.DomQueryMgr
public class DomQueryMgr
A class which provides XPath API facility on top of DOM by interfacing with James Clark's XT.
InputSource input = new InputSource(createURL("sample.xml"));
XMLProcessorImpl xmlproc = new JAXP_ProcessorImpl();
Document doc = xmlproc.load(input);
DomQueryMgr query_mgr = new DomQueryMgr(doc);
NamespacePrefixMap nspm = query_mgr.getEmptyNamespacePrefixMap();
nspm = nspm.bind("fuj", "http://www.fujitsu.co.jp/");
XPathContext ctx = query_mgr.createXPathContext(doc, nspm);
Enumeration iter = query_mgr.getNodesByXPath("(A/B/C)[2]", ctx);
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.fujitsu.xml.omquery.OmQueryMgrBase |
|---|
OmQueryMgrBase.MyExprContext, OmQueryMgrBase.MyLoadContext, OmQueryMgrBase.MyVariableMgr |
| Field Summary | |
|---|---|
(package private) com.jclark.xsl.dom.RootNode |
rootNode
|
| Fields inherited from class com.fujitsu.xml.omquery.OmQueryMgrBase |
|---|
nametbl |
| Constructor Summary | |
|---|---|
DomQueryMgr(org.w3c.dom.Document doc)
Constructs a Query Manager for DOM. |
|
| Method Summary | |
|---|---|
XPathContext |
createXPathContext()
Creates a XPath evaluation context with default values. |
XPathContext |
createXPathContext(org.w3c.dom.Node dom_node,
com.jclark.xsl.om.NamespacePrefixMap nspm)
Creates a XPath evaluation context with specified context node and namespace bindings. |
XPathContext |
createXPathContext(org.w3c.dom.Node dom_node,
com.jclark.xsl.om.NamespacePrefixMap nspm,
int position,
int size)
Creates a XPath evaluation context with specified values. |
boolean |
getBooleanByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
Evaluates XPath expression on top DOM to yield a boolean. |
boolean |
getBooleanByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
|
boolean |
getBooleanByXPath(java.lang.String selector,
XPathContext context)
Evaluates XPath expression on top DOM to yield a boolean. |
com.jclark.xsl.om.NamespacePrefixMap |
getEmptyNamespacePrefixMap()
Get an empty NamespacePrefixMap. |
java.util.Enumeration |
getNodesByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
Performs XPath query on top DOM. |
java.util.Enumeration |
getNodesByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
|
java.util.Enumeration |
getNodesByXPath(java.lang.String selector,
XPathContext context)
Performs XPath query on top DOM. |
double |
getNumberByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
Evaluates XPath expression on top DOM to yield a number. |
double |
getNumberByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
|
double |
getNumberByXPath(java.lang.String selector,
XPathContext context)
Evaluates XPath expression on top DOM to yield a number. |
java.lang.String |
getStringByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
Evaluates XPath expression on top DOM to yield a string. |
java.lang.String |
getStringByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
|
java.lang.String |
getStringByXPath(java.lang.String selector,
XPathContext context)
Evaluates XPath expression on top DOM to yield a string. |
(package private) com.jclark.xsl.om.Node |
getXtOmNode(org.w3c.dom.Node dom_node)
|
| Methods inherited from class com.fujitsu.xml.omquery.OmQueryMgrBase |
|---|
getBooleanWithXPath, getBooleanWithXPath, getBooleanWithXPath, getNameTable, getNodesWithXPath, getNodesWithXPath, getNodesWithXPath, getNumberWithXPath, getNumberWithXPath, getNumberWithXPath, getStringWithXPath, getStringWithXPath, getStringWithXPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
final com.jclark.xsl.dom.RootNode rootNode
| Constructor Detail |
|---|
public DomQueryMgr(org.w3c.dom.Document doc)
doc - an instance of org.w3c.dom.Document. In subsequent query request, an org.w3c.dom.Node owned by this document must be specified as the base node.| Method Detail |
|---|
public XPathContext createXPathContext()
public XPathContext createXPathContext(org.w3c.dom.Node dom_node,
com.jclark.xsl.om.NamespacePrefixMap nspm)
dom_node - context node of type org.w3c.dom.Nodenspm - Namespace bindings
public XPathContext createXPathContext(org.w3c.dom.Node dom_node,
com.jclark.xsl.om.NamespacePrefixMap nspm,
int position,
int size)
dom_node - context node of type org.w3c.dom.Nodenspm - Namespace bindingsposition - context positionposition - context size
public java.util.Enumeration getNodesByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
throws com.jclark.xsl.om.XSLException
base_node - the node where query processing starts from.selector - XPath query string
com.jclark.xsl.om.XSLException
public java.util.Enumeration getNodesByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
throws com.jclark.xsl.om.XSLException
com.jclark.xsl.om.XSLException
public java.util.Enumeration getNodesByXPath(java.lang.String selector,
XPathContext context)
throws com.jclark.xsl.om.XSLException
selector - XPath query stringcontext - XPath evaluation context against which the expression is to be evaluated
com.jclark.xsl.om.XSLException
public double getNumberByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
throws com.jclark.xsl.om.XSLException
base_node - the node where expression evaluation starts from.selector - XPath expression to be evaluated into a number
com.jclark.xsl.om.XSLException
public double getNumberByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
throws com.jclark.xsl.om.XSLException
com.jclark.xsl.om.XSLException
public double getNumberByXPath(java.lang.String selector,
XPathContext context)
throws com.jclark.xsl.om.XSLException
selector - XPath expression to be evaluated into a numbercontext - XPath evaluation context against which the expression is to be evaluated
com.jclark.xsl.om.XSLException
public boolean getBooleanByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
throws com.jclark.xsl.om.XSLException
base_node - the node where expression evaluation starts from.selector - XPath expression to be evaluated into a boolean
com.jclark.xsl.om.XSLException
public boolean getBooleanByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
throws com.jclark.xsl.om.XSLException
com.jclark.xsl.om.XSLException
public boolean getBooleanByXPath(java.lang.String selector,
XPathContext context)
throws com.jclark.xsl.om.XSLException
selector - XPath expression to be evaluated into a booleancontext - XPath evaluation context against which the expression is to be evaluated
com.jclark.xsl.om.XSLException
public java.lang.String getStringByXPath(org.w3c.dom.Node base_node,
java.lang.String selector)
throws com.jclark.xsl.om.XSLException
base_node - the node where expression evaluation starts from.selector - XPath expression to be evaluated into a string
com.jclark.xsl.om.XSLException
public java.lang.String getStringByXPath(org.w3c.dom.Node base_node,
java.lang.String selector,
com.jclark.xsl.om.NamespacePrefixMap nspm)
throws com.jclark.xsl.om.XSLException
com.jclark.xsl.om.XSLException
public java.lang.String getStringByXPath(java.lang.String selector,
XPathContext context)
throws com.jclark.xsl.om.XSLException
selector - XPath expression to be evaluated into a stringcontext - XPath evaluation context against which the expression is to be evaluated
com.jclark.xsl.om.XSLExceptionpublic com.jclark.xsl.om.NamespacePrefixMap getEmptyNamespacePrefixMap()
com.jclark.xsl.om.Node getXtOmNode(org.w3c.dom.Node dom_node)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||