|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xpath.DOMHelper | +--org.apache.xpath.DOM2Helper
Provides XSLTProcessor an interface to the Xerces XML parser. This liaison should be used if Xerces DOM nodes are being process as the source tree or as the result tree.
org.apache.xalan.xslt.XSLTProcessor
,
org.apache.xml.parsers
Constructor Summary | |
DOM2Helper()
Construct an instance. |
Method Summary | |
void |
checkNode(Node node)
**For internal use only** Check node to see if it matches this liaison. |
Document |
getDocument()
|
Element |
getElementByID(java.lang.String id,
Document doc)
Given an ID, return the element. |
java.lang.String |
getLocalNameOfNode(Node n)
Returns the local name of the given node. |
java.lang.String |
getNamespaceOfNode(Node n)
Returns the namespace of the given node. |
Node |
getParentOfNode(Node node)
Get the parent of a node. |
boolean |
isNodeAfter(Node node1,
Node node2)
Figure out if node2 should be placed after node1 when placing nodes in a list that is to be sorted in document order. |
void |
parse(InputSource source)
**For internal use only** Parse an XML document. |
void |
setDocument(Document doc)
|
boolean |
supportsSAX()
Returns true that this implementation does support the SAX ContentHandler interface. |
Methods inherited from class org.apache.xpath.DOMHelper |
createDocument,
getDOMFactory,
getExpandedAttributeName,
getExpandedElementName,
getLevel,
getNamespaceForPrefix,
getNodeData,
getNodeData,
getRoot,
getRootNode,
getUniqueID,
getUnparsedEntityURI,
isIgnorableWhitespace,
isNamespaceNode,
setDOMFactory,
shouldStripSourceNode |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DOM2Helper()
Method Detail |
public void checkNode(Node node) throws SAXException
public boolean supportsSAX()
public void setDocument(Document doc)
public Document getDocument()
public void parse(InputSource source) throws SAXException
Right now the Xerces DOMParser class is used. This needs fixing, either via jaxp, or via some other, standard method.
The application can use this method to instruct the SAX parser to begin parsing an XML document from any valid input source (a character stream, a byte stream, or a URI).
Applications may not invoke this method while a parse is in progress (they should create a new Parser instead for each additional XML document). Once a parse is complete, an application may reuse the same Parser object, possibly with a different input source.
source
- The input source for the top-level of the
XML document.InputSource
,
#parse(java.lang.String)
,
#setEntityResolver
,
#setDTDHandler
,
#setContentHandler
,
#setErrorHandler
public Element getElementByID(java.lang.String id, Document doc)
public boolean isNodeAfter(Node node1, Node node2)
public Node getParentOfNode(Node node) throws java.lang.RuntimeException
public java.lang.String getLocalNameOfNode(Node n)
public java.lang.String getNamespaceOfNode(Node n)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |