|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gnu.xml.aelfred2.SAXDriver
An enhanced SAX2 version of Microstar's Ælfred XML parser. The enhancements primarily relate to significant improvements in conformance to the XML specification, and SAX2 support. Performance has been improved. See the package level documentation for more information.
| Name | Notes |
|---|---|
| (URL)/external-general-entities | Value defaults to true |
| (URL)/external-parameter-entities | Value defaults to true |
| (URL)/is-standalone | (PRELIMINARY) Returns true iff the document's parsing has started (some non-error event after startDocument() was reported) and the document's standalone flag is set. |
| (URL)/namespace-prefixes | Value defaults to false (but XML 1.0 names are always reported) |
| (URL)/lexical-handler/parameter-entities | Value is fixed at true |
| (URL)/namespaces | Value defaults to true |
| (URL)/resolve-dtd-uris | (PRELIMINARY) Value defaults to true |
| (URL)/string-interning | Value is fixed at true |
| (URL)/use-attributes2 | (PRELIMINARY) Value is fixed at true |
| (URL)/use-entity-resolver2 | (PRELIMINARY) Value defaults to true |
| (URL)/validation | Value is fixed at false |
| (URL)/declaration-handler | A declaration handler may be provided. |
| (URL)/lexical-handler | A lexical handler may be provided. |
This parser currently implements the SAX1 Parser API, but it may not continue to do so in the future.
Parser| Constructor Summary | |
SAXDriver()
Constructs a SAX Parser. |
|
| Method Summary | |
int |
getColumnNumber()
SAX Locator method (don't invoke on parser); |
ContentHandler |
getContentHandler()
SAX2: Returns the object used to report the logical content of an XML document. |
DTDHandler |
getDTDHandler()
SAX2: Returns the object used to process declarations related to notations and unparsed entities. |
EntityResolver |
getEntityResolver()
SAX2: Returns the object used when resolving external entities during parsing (both general and parameter entities). |
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 |
getIndex(java.lang.String xmlName)
SAX2 Attributes method (don't invoke on parser); |
int |
getIndex(java.lang.String uri,
java.lang.String local)
SAX2 Attributes method (don't invoke on parser); |
int |
getLength()
SAX1 AttributeList, SAX2 Attributes method (don't invoke on parser); |
int |
getLineNumber()
SAX Locator method (don't invoke on parser); |
java.lang.String |
getLocalName(int index)
SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getName(int i)
SAX1 AttributeList method (don't invoke on parser); |
java.lang.Object |
getProperty(java.lang.String propertyId)
SAX2: Returns the specified property. |
java.lang.String |
getPublicId()
SAX Locator method (don't invoke on parser); |
java.lang.String |
getQName(int i)
SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getSystemId()
SAX Locator method (don't invoke on parser); |
java.lang.String |
getType(int i)
SAX1 AttributeList, SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getType(java.lang.String xmlName)
SAX1 AttributeList, SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getType(java.lang.String uri,
java.lang.String local)
SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getURI(int index)
SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getValue(int i)
SAX1 AttributeList, SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getValue(java.lang.String xmlName)
SAX1 AttributeList, SAX2 Attributes method (don't invoke on parser); |
java.lang.String |
getValue(java.lang.String uri,
java.lang.String local)
SAX Attributes method (don't invoke on parser); |
boolean |
isSpecified(int index)
SAX-ext Attributes2 method (don't invoke on parser); |
boolean |
isSpecified(java.lang.String xmlName)
SAX-ext Attributes2 method (don't invoke on parser); |
boolean |
isSpecified(java.lang.String uri,
java.lang.String local)
SAX-ext Attributes2 method (don't invoke on parser); |
void |
parse(InputSource source)
SAX1, SAX2: Auxiliary API to parse an XML document, used mostly when no URI is available. |
void |
parse(java.lang.String systemId)
SAX1, SAX2: Preferred API to parse an XML document, using a system identifier (URI). |
void |
setContentHandler(ContentHandler handler)
SAX2: Assigns the object used to report the logical content of an XML document. |
void |
setDocumentHandler(DocumentHandler handler)
Deprecated. SAX2 programs should use the XMLReader interface and a ContentHandler. |
void |
setDTDHandler(DTDHandler handler)
SAX1, SAX2: Set the DTD handler for this parser. |
void |
setEntityResolver(EntityResolver resolver)
SAX1, SAX2: Set the entity resolver for this parser. |
void |
setErrorHandler(ErrorHandler handler)
SAX1, SAX2: Set the error handler for this parser. |
void |
setFeature(java.lang.String featureId,
boolean value)
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 value)
SAX2: Assigns the specified property. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SAXDriver()
| Method Detail |
public void setLocale(java.util.Locale locale)
throws SAXException
setLocale in interface Parserlocale - The locale for which diagnostics will be generatedpublic EntityResolver getEntityResolver()
getEntityResolver in interface XMLReaderorg.xml.sax.XMLReaderXMLReader.setEntityResolver(org.xml.sax.EntityResolver)public void setEntityResolver(EntityResolver resolver)
setEntityResolver in interface XMLReaderhandler - The object to receive entity events.public DTDHandler getDTDHandler()
getDTDHandler in interface XMLReaderorg.xml.sax.XMLReaderXMLReader.setDTDHandler(org.xml.sax.DTDHandler)public void setDTDHandler(DTDHandler handler)
setDTDHandler in interface XMLReaderhandler - The object to receive DTD events.public void setDocumentHandler(DocumentHandler handler)
setDocumentHandler in interface Parserhandler - The object to receive document events.public ContentHandler getContentHandler()
getContentHandler in interface XMLReaderorg.xml.sax.XMLReaderXMLReader.setContentHandler(org.xml.sax.ContentHandler)public void setContentHandler(ContentHandler handler)
setContentHandler in interface XMLReaderorg.xml.sax.XMLReaderhandler - The content handler.XMLReader.getContentHandler()public void setErrorHandler(ErrorHandler handler)
setErrorHandler in interface XMLReaderhandler - The object to receive error events.public ErrorHandler getErrorHandler()
getErrorHandler in interface XMLReaderorg.xml.sax.XMLReaderXMLReader.setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(InputSource source)
throws SAXException,
java.io.IOException
parse in interface XMLReadersource - The XML input source. Don't set 'encoding' unless
you know for a fact that it's correct.SAXException - The handlers may throw any SAXException,
and the parser normally throws SAXParseException objects.java.io.IOException - IOExceptions are normally through through
the parser if there are problems reading the source document.setEntityResolver(org.xml.sax.EntityResolver),
setDTDHandler(org.xml.sax.DTDHandler),
setContentHandler(org.xml.sax.ContentHandler),
setErrorHandler(org.xml.sax.ErrorHandler)
public void parse(java.lang.String systemId)
throws SAXException,
java.io.IOException
parse in interface XMLReaderorg.xml.sax.XMLReadersystemId - The system identifier (URI).SAXException - Any SAX exception, possibly
wrapping another exception.java.io.IOException - An IO exception from the parser,
possibly from a byte stream or character stream
supplied by the application.XMLReader.parse(org.xml.sax.InputSource)
public boolean getFeature(java.lang.String featureId)
throws SAXNotRecognizedException,
SAXNotSupportedException
getFeature in interface XMLReaderSAXNotRecognizedException - thrown if the feature flag
is neither built in, nor yet assigned.
public java.lang.Object getProperty(java.lang.String propertyId)
throws SAXNotRecognizedException
getProperty in interface XMLReaderSAXNotRecognizedException - thrown if the property value
is neither built in, nor yet stored.
public void setFeature(java.lang.String featureId,
boolean value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setFeature in interface XMLReaderorg.xml.sax.XMLReadername - The feature name, which is a fully-qualified URI.value - The requested value of the feature (true or false).SAXNotRecognizedException - If the feature
value can't be assigned or retrieved.SAXNotSupportedException - When the
XMLReader recognizes the feature name but
cannot set the requested value.XMLReader.getFeature(java.lang.String)
public void setProperty(java.lang.String propertyId,
java.lang.Object value)
throws SAXNotRecognizedException,
SAXNotSupportedException
setProperty in interface XMLReaderorg.xml.sax.XMLReadername - The property name, which is a fully-qualified URI.value - The requested value for the property.SAXNotRecognizedException - If the property
value can't be assigned or retrieved.SAXNotSupportedException - When the
XMLReader recognizes the property name but
cannot set the requested value.public int getLength()
getLength in interface Attributesorg.xml.sax.AttributeListpublic java.lang.String getURI(int index)
getURI in interface Attributesorg.xml.sax.Attributesindex - The attribute index (zero-based).Attributes.getLength()public java.lang.String getLocalName(int index)
getLocalName in interface Attributesorg.xml.sax.Attributesindex - The attribute index (zero-based).Attributes.getLength()public java.lang.String getQName(int i)
getQName in interface Attributesorg.xml.sax.Attributesindex - The attribute index (zero-based).Attributes.getLength()public java.lang.String getName(int i)
getName in interface AttributeListorg.xml.sax.AttributeListi - The index of the attribute in the list (starting at 0).AttributeList.getLength()public java.lang.String getType(int i)
getType in interface Attributesorg.xml.sax.AttributeListi - The index of the attribute in the list (starting at 0).AttributeList.getLength(),
AttributeList.getType(java.lang.String)public java.lang.String getValue(int i)
getValue in interface Attributesorg.xml.sax.AttributeListi - The index of the attribute in the list (starting at 0).AttributeList.getLength(),
AttributeList.getValue(java.lang.String)
public int getIndex(java.lang.String uri,
java.lang.String local)
getIndex in interface Attributesorg.xml.sax.Attributesuri - The Namespace URI, or the empty string if
the name has no Namespace URI.localName - The attribute's local name.public int getIndex(java.lang.String xmlName)
getIndex in interface Attributesorg.xml.sax.AttributesqName - The qualified (prefixed) name.
public java.lang.String getType(java.lang.String uri,
java.lang.String local)
getType in interface Attributesorg.xml.sax.Attributesuri - The Namespace URI, or the empty String if the
name has no Namespace URI.localName - The local name of the attribute.public java.lang.String getType(java.lang.String xmlName)
getType in interface Attributesorg.xml.sax.AttributeListname - The name of the attribute.AttributeList.getType(int)
public java.lang.String getValue(java.lang.String uri,
java.lang.String local)
getValue in interface Attributesorg.xml.sax.Attributesuri - The Namespace URI, or the empty String if the
name has no Namespace URI.localName - The local name of the attribute.public java.lang.String getValue(java.lang.String xmlName)
getValue in interface Attributesorg.xml.sax.AttributeListi - The index of the attribute in the list.AttributeList.getValue(int)public boolean isSpecified(int index)
isSpecified in interface Attributes2org.xml.sax.ext.Attributes2index - The attribute index (zero-based).java.lang.ArrayIndexOutOfBoundsException - When the
supplied index does not identify an attribute.
public boolean isSpecified(java.lang.String uri,
java.lang.String local)
isSpecified in interface Attributes2org.xml.sax.ext.Attributes2uri - The Namespace URI, or the empty string if
the name has no Namespace URI.localName - The attribute's local name.java.lang.IllegalArgumentException - When the
supplied names do not identify an attribute.public boolean isSpecified(java.lang.String xmlName)
isSpecified in interface Attributes2org.xml.sax.ext.Attributes2qName - The XML 1.0 qualified name.java.lang.IllegalArgumentException - When the
supplied name does not identify an attribute.public java.lang.String getPublicId()
getPublicId in interface Locatororg.xml.sax.LocatorLocator.getSystemId()public java.lang.String getSystemId()
getSystemId in interface Locatororg.xml.sax.LocatorLocator.getPublicId()public int getLineNumber()
getLineNumber in interface Locatororg.xml.sax.LocatorLocator.getColumnNumber()public int getColumnNumber()
getColumnNumber in interface Locatororg.xml.sax.LocatorLocator.getLineNumber()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Source code is under GPL (with library exception) in the JAXP project at http://www.gnu.org/software/classpathx/jaxp
This documentation was derived from that source code on 2001-11-20.