|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xml.utils.DOMHelper | +--org.apache.xml.utils.DOM2Helper
Constructor Summary | |
DOM2Helper()
Deprecated. Construct an instance. |
Method Summary | |
void |
checkNode(Node node)
Deprecated. **For internal use only** Check node to see if it was created by a DOM implementation that this helper is intended to support. |
Document |
getDocument()
Deprecated. Query which document this helper is currently operating on. |
Element |
getElementByID(java.lang.String id,
Document doc)
Deprecated. Given an XML ID, return the element. |
java.lang.String |
getLocalNameOfNode(Node n)
Deprecated. Returns the local name of the given node, as defined by the XML Namespaces specification. |
java.lang.String |
getNamespaceOfNode(Node n)
Deprecated. Returns the Namespace Name (Namespace URI) for the given node. |
static Node |
getParentOfNode(Node node)
Deprecated. Get the XPath-model parent of a node. |
static boolean |
isNodeAfter(Node node1,
Node node2)
Deprecated. Figure out whether node2 should be considered as being later in the document than node1, in Document Order as defined by the XPath model. |
void |
parse(InputSource source)
Deprecated. **For internal use only** Parse an XML document. |
void |
setDocument(Document doc)
Deprecated. Specify which document this helper is currently operating on. |
boolean |
supportsSAX()
Deprecated. Returns true if the DOM implementation handled by this helper supports the SAX ContentHandler interface. |
Methods inherited from class org.apache.xml.utils.DOMHelper |
createDocument,
getDOMFactory,
getExpandedAttributeName,
getExpandedElementName,
getLevel,
getNamespaceForPrefix,
getNodeData,
getNodeData,
getRoot,
getRootNode,
getUniqueID,
getUnparsedEntityURI,
isIgnorableWhitespace,
isNamespaceNode,
isNodeTheSame,
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 TransformerException
node
- The node to be tested.public boolean supportsSAX()
public void setDocument(Document doc)
doc
- The DOM Document node for this document.getDocument()
public Document getDocument()
setDocument(org.w3c.dom.Document)
public void parse(InputSource source) throws TransformerException
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.public Element getElementByID(java.lang.String id, Document doc)
id
- The ID to search for, as a String.doc
- The document to search within, as a DOM Document node.public static boolean isNodeAfter(Node node1, Node node2)
There are some cases where ordering isn't defined, and neither are the results of this function -- though we'll generally return true.
TODO: Make sure this does the right thing with attribute nodes!!!
node1
- DOM Node to perform position comparison on.node2
- DOM Node to perform position comparison on .(node1.documentOrderPosition <= node2.documentOrderPosition)
.public static Node getParentOfNode(Node node)
node
- Node to be examinedpublic java.lang.String getLocalNameOfNode(Node n)
n
- Node to be examinedpublic java.lang.String getNamespaceOfNode(Node n)
TODO: Reconcile with getLocalNameOfNode.
n
- Node to be examined
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |