|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icl.saxon.DOMDriver
DOMDriver.java: (pseudo-)SAX driver for DOM.
This class simulates the action of a SAX Parser, taking an already-constructed
DOM Document and walking around it in a depth-first traversal,
calling a SAX-compliant ContentHandler to process the children as it does so.
| Field Summary | |
protected org.xml.sax.ContentHandler |
contentHandler
|
protected org.w3c.dom.Node |
root
|
protected java.lang.String |
systemId
|
| Constructor Summary | |
DOMDriver()
|
|
| Method Summary | |
int |
getColumnNumber()
|
org.xml.sax.ContentHandler |
getContentHandler()
|
org.xml.sax.DTDHandler |
getDTDHandler()
SAX2: Returns the object used to process declarations related to notations and unparsed entities. |
org.xml.sax.EntityResolver |
getEntityResolver()
SAX2: Returns the object used when resolving external entities during parsing (both general and parameter entities). |
org.xml.sax.ErrorHandler |
getErrorHandler()
SAX2: Returns the object used to receive callbacks for XML errors of all levels (fatal, nonfatal, warning); this is never null; |
boolean |
getFeature(java.lang.String featureId)
SAX2: Tells the value of the specified feature flag. |
int |
getLineNumber()
|
java.lang.Object |
getProperty(java.lang.String name)
SAX2: Returns the specified property. |
java.lang.String |
getPublicId()
|
java.lang.String |
getSystemId()
|
void |
parse()
Walk a document (traversing the nodes depth first) |
void |
parse(org.xml.sax.InputSource source)
Parse from InputSource. |
void |
parse(java.lang.String source)
Parse from SystemId. |
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the content handler. |
void |
setDocumentHandler(org.xml.sax.DocumentHandler handler)
Deprecated. SAX2 programs should use the XMLReader interface and a ContentHandler. |
void |
setDTDHandler(org.xml.sax.DTDHandler handler)
SAX1, SAX2: Set the DTD handler for this parser. |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver)
SAX1, SAX2: Set the entity resolver for this parser. |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)
SAX1, SAX2: Set the error handler for this parser. |
void |
setFeature(java.lang.String featureId,
boolean on)
SAX2: Sets the state of feature flags in this parser. |
void |
setLocale(java.util.Locale locale)
SAX1: Sets the locale used for diagnostics; currently, only locales using the English language are supported. |
void |
setProperty(java.lang.String propertyId,
java.lang.Object property)
SAX2: Assigns the specified property. |
void |
setStartNode(org.w3c.dom.Node start)
Set the DOM Document that will be walked |
void |
setSystemId(java.lang.String systemId)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected org.xml.sax.ContentHandler contentHandler
protected org.w3c.dom.Node root
protected java.lang.String systemId
| Constructor Detail |
public DOMDriver()
| Method Detail |
public void setContentHandler(org.xml.sax.ContentHandler handler)
setContentHandler in interface org.xml.sax.XMLReaderhandler - The object to receive content events. If this also implements LexicalHandler,
it will also be notified of comments.public org.xml.sax.ContentHandler getContentHandler()
getContentHandler in interface org.xml.sax.XMLReader
public void setLocale(java.util.Locale locale)
throws org.xml.sax.SAXException
locale - The locale for which diagnostics will be generated
org.xml.sax.SAXExceptionpublic org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver in interface org.xml.sax.XMLReaderpublic void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver in interface org.xml.sax.XMLReaderresolver - The object to receive entity events.public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler in interface org.xml.sax.XMLReaderpublic void setDTDHandler(org.xml.sax.DTDHandler handler)
setDTDHandler in interface org.xml.sax.XMLReaderhandler - The object to receive DTD events.public void setDocumentHandler(org.xml.sax.DocumentHandler handler)
handler - The object to receive document events.public void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler in interface org.xml.sax.XMLReaderhandler - The object to receive error events.public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler in interface org.xml.sax.XMLReaderpublic void setStartNode(org.w3c.dom.Node start)
public void parse(org.xml.sax.InputSource source)
throws org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderorg.xml.sax.SAXException
public void parse(java.lang.String source)
throws org.xml.sax.SAXException
parse in interface org.xml.sax.XMLReaderorg.xml.sax.SAXException
public void parse()
throws org.xml.sax.SAXException
org.xml.sax.SAXException - On any error in the documentpublic void setSystemId(java.lang.String systemId)
public java.lang.String getPublicId()
getPublicId in interface org.xml.sax.Locatorpublic java.lang.String getSystemId()
getSystemId in interface org.xml.sax.Locatorpublic int getLineNumber()
getLineNumber in interface org.xml.sax.Locatorpublic int getColumnNumber()
getColumnNumber in interface org.xml.sax.Locator
public boolean getFeature(java.lang.String featureId)
throws org.xml.sax.SAXNotRecognizedException
getFeature in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedException - thrown if the feature flag
is neither built in, nor yet assigned.
public java.lang.Object getProperty(java.lang.String name)
throws org.xml.sax.SAXNotRecognizedException
getProperty in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedException - thrown if the property value
is neither built in, nor yet stored.
public void setFeature(java.lang.String featureId,
boolean on)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setFeature in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setProperty(java.lang.String propertyId,
java.lang.Object property)
throws org.xml.sax.SAXNotRecognizedException,
org.xml.sax.SAXNotSupportedException
setProperty in interface org.xml.sax.XMLReaderorg.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||