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