Google

Xerces 3.1.1 API: Class XMLReaderAdapter
Xerces 3.1.1


Class XMLReaderAdapter

java.lang.Object
  |

Adapt a SAX2 XMLReader as a SAX1 Parser.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.
must support a true value for the property, that will also be used to improve efficiency.

Since:
SAX 2.0
Version:
2.0


          Create a new adapter.
          Create a new adapter.
Constructor Summary
  int start, int length)
          Adapt a SAX2 characters event.
          End document event. java.lang.String localName, java.lang.String qName)
          Adapt a SAX2 end element event.
          Adapt a SAX2 end prefix mapping event. int start, int length)
          Adapt a SAX2 ignorable whitespace event.
          Parse the document.
          Parse the document. java.lang.String data)
          Adapt a SAX2 processing instruction event.
          Register the SAX1 document event handler.
          Set a document locator.
          Register the DTD event handler.
          Register the entity resolver.
          Register the error event handler.
          Set the locale for error reporting.
          Adapt a SAX2 skipped entity event.
          Start document event. java.lang.String localName, java.lang.String qName,
          Adapt a SAX2 start element event. java.lang.String uri)
          Adapt a SAX2 start prefix mapping event.
Method Summary
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 void
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

public XMLReaderAdapter()
Create a new adapter. driver to embed.

cannot be instantiated or if the

Create a new adapter.

Create a new adapter, wrapped around a SAX2 XMLReader. The adapter will make the XMLReader act like a SAX1 Parser.

Method Detail

setLocale

public void setLocale(java.util.Locale locale)
Set the locale for error reporting.

This is not supported in SAX2, and will always throw an exception.


setEntityResolver

Register the entity resolver.

setDTDHandler
Register the DTD event handler.

setDocumentHandler
Register the SAX1 document event handler.

Note that the SAX1 document handler has no Namespace support.


setErrorHandler
Register the error event handler.

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
Parse the document.

This method will throw an exception if the embedded XMLReader does not support the

Parameters:
systemId - The absolute URL of the document.
Throws:
java.io.IOException - If there is a problem reading

parse
           throws java.io.IOException,
Parse the document.

This method will throw an exception if the embedded XMLReader does not support the

Parameters:
input - An input source for the document.
Throws:
java.io.IOException - If there is a problem reading

setDocumentLocator
Set a document locator.

startDocument

public void startDocument()
Start document event.

endDocument

public void endDocument()
End document event.

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
Adapt a SAX2 start prefix mapping event.

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
Adapt a SAX2 end prefix mapping event.

startElement
public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
Adapt a SAX2 start element event.

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
Adapt a SAX2 end element event.

characters

public void characters(char[] ch,
                       int start,
                       int length)
Adapt a SAX2 characters event.

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Adapt a SAX2 ignorable whitespace event.

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Adapt a SAX2 processing instruction event.

skippedEntity

public void skippedEntity(java.lang.String name)
Adapt a SAX2 skipped entity event.

Xerces 3.1.1