|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMLParserDriver
XML Parser driver. This driver encapsulate the actual parser, and the non standard methods.
Method Summary | |
---|---|
org.w3c.dom.Document |
createDocument(java.lang.String namespaceURI,
java.lang.String qualifiedName,
org.w3c.dom.DocumentType doctype)
Creates a DOM Document object given the uri, qualified name, and Document type. |
org.w3c.dom.DocumentType |
createDocumentType(java.lang.String qualifiedName,
java.lang.String publicId,
java.lang.String systemId)
Creates an empty DocumentType node. |
java.lang.Object |
createXPath(java.lang.String xpath)
Creates an XPage expression based on the provided String |
com.ibm.commons.xml.XResult |
evaluateXPath(org.w3c.dom.NodeList nodeList,
java.lang.Object xpath,
com.ibm.commons.xml.NamespaceContext nsContext)
Evaluate the xpath relative to the given NodeList and namespace context |
com.ibm.commons.xml.XResult |
evaluateXPath(org.w3c.dom.Node node,
java.lang.Object xpath,
com.ibm.commons.xml.NamespaceContext nsContext)
Evaluate the xpath relative to the given node and namespace context |
org.w3c.dom.traversal.DocumentTraversal |
getDocumentTraversal(org.w3c.dom.Document doc)
Returns a DocumentTraversal object that can be used on the provided document object |
org.w3c.dom.DOMImplementation |
getDOMImplementation()
Returns the W3C DomImplementation |
com.ibm.commons.xml.NamespaceContext |
getNamespaceContext(org.w3c.dom.Document doc)
Get the selection NamespaceContext use during the XPath evaluation on the document. |
com.ibm.commons.xml.XPathContext |
getXPathContext(org.w3c.dom.Document doc)
Returns the XPath context associated to an XML document |
org.w3c.dom.Document |
parse(java.io.InputStream is,
boolean ignoreBlanks,
boolean resolveEntities,
boolean validate)
Creates a W3C DOM Document based on the inputstream provided. |
org.w3c.dom.Document |
parse(java.io.Reader reader,
boolean ignoreBlanks,
boolean resolveEntities,
boolean validate)
Creates a W3C DOM Document based on the Reader provided. |
void |
popXPathContext(org.w3c.dom.Document doc)
Remove the latest XPath context that has been set to the document An XML document contains a base XPath that is used when evaluating XPath against a node. |
void |
pushXPathContext(org.w3c.dom.Document doc,
java.lang.String xpath)
Push an XPath context to an existing document. |
void |
serialize(java.io.OutputStream os,
org.w3c.dom.Node node,
com.ibm.commons.xml.Format format)
Saves the provided node to the given stream, using the given formatter. |
void |
serialize(java.io.Writer writer,
org.w3c.dom.Node node,
com.ibm.commons.xml.Format format)
Saves the provided node to the given stream, using the given formatter. |
void |
setNamespaceContext(org.w3c.dom.Document doc,
com.ibm.commons.xml.NamespaceContext ns)
Set the namespaces map use during the XPath evaluation on the document. |
Method Detail |
---|
org.w3c.dom.DOMImplementation getDOMImplementation()
org.w3c.dom.Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype) throws XMLException
namespaceURI
- a fully qualified namespace URIqualifiedName
- The qualified name of the document element to be created or null.doctype
- The type of document to be created or null. When doctype is not null, its Node.ownerDocument attribute is set to the document being created.
XMLException
- throws an XML exception when invalid input is givenorg.w3c.dom.DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId) throws XMLException
qualifiedName
- the qualified name of the document typepublicId
- the public identifiersystemId
- the system identifier
XMLException
- throws an XMLException if the parameters contain illegal XML inputorg.w3c.dom.Document parse(java.io.InputStream is, boolean ignoreBlanks, boolean resolveEntities, boolean validate) throws XMLException
is
- an input stream which contains a DOM documentignoreBlanks
- ignore blanks (spaces and tabs) in the provided streamresolveEntities
- resolve entities in the provided streamvalidate
- validate the resulting document
XMLException
- throws an exception if the provided inputstream contains illegal XML markuporg.w3c.dom.Document parse(java.io.Reader reader, boolean ignoreBlanks, boolean resolveEntities, boolean validate) throws XMLException
reader
- an reader which contains a DOM documentignoreBlanks
- ignore blanks (spaces and tabs) in the provided readerresolveEntities
- resolve entities in the provided streamvalidate
- validate the resulting document
XMLException
- throws an exception if the provided reader contains illegal XML markupvoid serialize(java.io.OutputStream os, org.w3c.dom.Node node, com.ibm.commons.xml.Format format) throws XMLException
os
- the stream where the DOM Node is to be saved (serialized) tonode
- a DOM Node that is to be serializedformat
- a formatter that is used to format the Node when serialized
XMLException
- throws an exception if the node is illegal or if the stream is not accessiblevoid serialize(java.io.Writer writer, org.w3c.dom.Node node, com.ibm.commons.xml.Format format) throws XMLException
os
- the stream where the DOM Node is to be saved (serialized) tonode
- a DOM Node that is to be serializedformat
- a formatter that is used to format the Node when serialized
XMLException
- throws an exception if the node is illegal or if the stream is not accessiblejava.lang.Object createXPath(java.lang.String xpath) throws com.ibm.commons.xml.xpath.XPathException
xpath
- the XPath we wish to encapsulate
com.ibm.commons.xml.xpath.XPathException
com.ibm.commons.xml.XResult evaluateXPath(org.w3c.dom.Node node, java.lang.Object xpath, com.ibm.commons.xml.NamespaceContext nsContext) throws com.ibm.commons.xml.xpath.XPathException
node
- a node that we wish to evaluate using the given XPathxpath
- a namespace context to be used when evaluting the XPathnsContext
-
com.ibm.commons.xml.xpath.XPathException
com.ibm.commons.xml.XResult evaluateXPath(org.w3c.dom.NodeList nodeList, java.lang.Object xpath, com.ibm.commons.xml.NamespaceContext nsContext) throws com.ibm.commons.xml.xpath.XPathException
nodeList
- a node list that we wish to evaluate using the given XPathxpath
- a namespace context to be used when evaluting the XPathnsContext
-
com.ibm.commons.xml.xpath.XPathException
com.ibm.commons.xml.XPathContext getXPathContext(org.w3c.dom.Document doc)
doc
- a DOM Document
void pushXPathContext(org.w3c.dom.Document doc, java.lang.String xpath) throws XMLException
doc
- the document where the xpath is to be setxpath
- the xpath to set
XMLException
void popXPathContext(org.w3c.dom.Document doc) throws XMLException
doc
- the source document
XMLException
com.ibm.commons.xml.NamespaceContext getNamespaceContext(org.w3c.dom.Document doc)
doc
- the source document
void setNamespaceContext(org.w3c.dom.Document doc, com.ibm.commons.xml.NamespaceContext ns)
doc
- the source documentselectionNS
- the NamespaceContext used during XPath evaluation on the document in order to resolve namespaces.org.w3c.dom.traversal.DocumentTraversal getDocumentTraversal(org.w3c.dom.Document doc)
doc
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |