public class DOMTreeXMLReader extends java.lang.Object implements org.xml.sax.XMLReader, SAXConstants
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAMESPACE_DECLARATION_PREFIX
The "xmlns" prefix that is used in XML to declare a namespace prefixes.
|
FEATURE_NAMESPACE_PREFIXES, FEATURE_NAMESPACES, FEATURE_VALIDATING
Constructor and Description |
---|
DOMTreeXMLReader()
Initialize the new instance with default values.
|
Modifier and Type | Method and Description |
---|---|
protected void |
basicSetFeature(java.lang.String name,
boolean value) |
org.xml.sax.ContentHandler |
getContentHandler() |
org.xml.sax.DTDHandler |
getDTDHandler()
This method is not supported !
Therefore this method always returns null ! |
org.xml.sax.EntityResolver |
getEntityResolver()
This method is not supported !
Therefore this method always returns null ! |
org.xml.sax.ErrorHandler |
getErrorHandler()
This method is not supported !
Therefore this method always returns null ! |
boolean |
getFeature(java.lang.String name)
Returns whether or not the feature with the given name is on.
|
protected java.util.Map<java.lang.String,java.lang.Boolean> |
getFeatures() |
java.lang.Object |
getProperty(java.lang.String name)
This method is not supported !
Therefore this method throws always an Exception ! |
protected void |
handleCData(org.w3c.dom.CDATASection cdata) |
protected void |
handleElement(org.w3c.dom.Element element) |
protected void |
handleNode(org.w3c.dom.Node node) |
protected void |
handleNodes(org.w3c.dom.NodeList nodes) |
protected void |
handleProcessingInstruction(org.w3c.dom.ProcessingInstruction instruction) |
protected void |
handleText(org.w3c.dom.Text text) |
protected void |
initFeatures() |
protected boolean |
isFeatureOn(java.lang.String featureName) |
protected java.lang.Boolean |
lookupFeature(java.lang.String featureName) |
protected void |
notSupportedError(java.lang.String text) |
void |
parse(org.w3c.dom.Document document)
This method iterates over all elements of the specified DOM document
and calls the corresponding callback-methods of its ContentHandler.
|
void |
parse(org.w3c.dom.Element element)
This method iterates over all elements of the specified DOM root element
and calls the corresponding callback-methods of its ContentHandler.
|
void |
parse(org.xml.sax.InputSource source)
This method is not allowed here, because this parser can handle
Document Object Model documents only !
Therefore this method throws always an Exception ! |
void |
parse(java.lang.String systemId)
This method is not allowed here, because this parser can handle
Document Object Model documents only !
Therefore this method throws always an Exception ! |
protected void |
parseDocument(org.w3c.dom.Document document)
This method iterates over all elements of the specified DOM document
and calls the corresponding callback-methods of its ContentHandler.
|
protected void |
parseElement(org.w3c.dom.Element rootElement)
This method iterates over all elements of the specified DOM root element
and calls the corresponding callback-methods of its ContentHandler.
|
void |
setContentHandler(org.xml.sax.ContentHandler newValue)
Allow an application to register a document event handler.
|
void |
setDTDHandler(org.xml.sax.DTDHandler handler)
This method is not supported !
It's just an empty implementation that does nothing. |
void |
setEntityResolver(org.xml.sax.EntityResolver resolver)
This method is not supported !
It's just an empty implementation that does nothing. |
void |
setErrorHandler(org.xml.sax.ErrorHandler handler)
This method is not supported !
It's just an empty implementation that does nothing. |
void |
setFeature(java.lang.String name,
boolean value)
Switch the feature with the given name on or off.
|
protected void |
setFeatures(java.util.Map<java.lang.String,java.lang.Boolean> newValue) |
void |
setLocale(java.util.Locale locale)
This method is not supported !
Therefore this method throws always an Exception ! |
void |
setProperty(java.lang.String name,
java.lang.Object value)
This method is not supported !
Therefore this method throws always an Exception ! |
protected boolean |
supportNamespacePrefixes() |
protected boolean |
supportNamespaces() |
protected void |
triggerPrefixEvent(java.util.Properties declarations,
boolean start) |
public static final java.lang.String NAMESPACE_DECLARATION_PREFIX
public DOMTreeXMLReader()
public void setContentHandler(org.xml.sax.ContentHandler newValue)
setContentHandler
in interface org.xml.sax.XMLReader
public void parse(org.w3c.dom.Document document) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void parse(org.w3c.dom.Element element) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public void parse(org.xml.sax.InputSource source) throws org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
public void parse(java.lang.String systemId) throws org.xml.sax.SAXException
parse
in interface org.xml.sax.XMLReader
org.xml.sax.SAXException
public void setDTDHandler(org.xml.sax.DTDHandler handler)
setDTDHandler
in interface org.xml.sax.XMLReader
public void setEntityResolver(org.xml.sax.EntityResolver resolver)
setEntityResolver
in interface org.xml.sax.XMLReader
public void setErrorHandler(org.xml.sax.ErrorHandler handler)
setErrorHandler
in interface org.xml.sax.XMLReader
public void setLocale(java.util.Locale locale) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public java.lang.Object getProperty(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getProperty
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setProperty(java.lang.String name, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setProperty
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public boolean getFeature(java.lang.String name) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
getFeature
in interface org.xml.sax.XMLReader
name
- The name of the featureorg.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public void setFeature(java.lang.String name, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedException
setFeature
in interface org.xml.sax.XMLReader
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException
public org.xml.sax.DTDHandler getDTDHandler()
getDTDHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.ErrorHandler getErrorHandler()
getErrorHandler
in interface org.xml.sax.XMLReader
public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface org.xml.sax.XMLReader
protected void notSupportedError(java.lang.String text) throws org.xml.sax.SAXException
org.xml.sax.SAXException
public org.xml.sax.ContentHandler getContentHandler()
getContentHandler
in interface org.xml.sax.XMLReader
protected void parseDocument(org.w3c.dom.Document document) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void parseElement(org.w3c.dom.Element rootElement) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleNodes(org.w3c.dom.NodeList nodes) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleNode(org.w3c.dom.Node node) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleElement(org.w3c.dom.Element element) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleText(org.w3c.dom.Text text) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleProcessingInstruction(org.w3c.dom.ProcessingInstruction instruction) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void handleCData(org.w3c.dom.CDATASection cdata) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected void triggerPrefixEvent(java.util.Properties declarations, boolean start) throws org.xml.sax.SAXException
org.xml.sax.SAXException
protected java.lang.Boolean lookupFeature(java.lang.String featureName)
protected boolean supportNamespaces()
protected boolean supportNamespacePrefixes()
protected boolean isFeatureOn(java.lang.String featureName)
protected void basicSetFeature(java.lang.String name, boolean value)
protected void initFeatures()
protected java.util.Map<java.lang.String,java.lang.Boolean> getFeatures()
protected void setFeatures(java.util.Map<java.lang.String,java.lang.Boolean> newValue)