|
|
|
|
|
|
Modules Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages
acdk::xml::sax::XMLReader Class Reference#include <XMLReader.h>
Inheritance diagram for acdk::xml::sax::XMLReader:
List of all members.
|
Public Member Functions |
| XMLReader (bool useNamespace=true, int xmlFlags=XMLRF_DEFAULTFLAGS) |
| ~XMLReader () |
virtual bool | getFeature (IN(RString) name) throw ( org::xml::sax::RSAXNotRecognizedException , org::xml::sax::RSAXNotSupportedException ) |
| Look up the value of a feature flag.
|
virtual void | setFeature (IN(RString) name, bool value) throw ( org::xml::sax::RSAXNotRecognizedException , org::xml::sax::RSAXNotSupportedException ) |
| Set the value of a feature flag.
|
virtual acdk::lang::Object | getProperty (IN(RString) name) throw ( org::xml::sax::RSAXNotRecognizedException , org::xml::sax::RSAXNotSupportedException ) |
| Look up the value of a property.
|
virtual void | setProperty (IN(RString) name, IN(acdk::lang::Object) value) throw ( org::xml::sax::RSAXNotRecognizedException , org::xml::sax::RSAXNotSupportedException ) |
| Set the value of a property.
|
virtual void | setEntityResolver (IN(org::xml::sax::REntityResolver) resolver) |
virtual org::xml::sax::REntityResolver | getEntityResolver () |
| Return the current entity resolver.
|
virtual void | setDTDHandler (IN(org::xml::sax::RDTDHandler) handler) |
virtual org::xml::sax::RDTDHandler | getDTDHandler () |
| Return the current DTD handler.
|
virtual void | setContentHandler (IN(org::xml::sax::RContentHandler) handler) |
virtual org::xml::sax::RContentHandler | getContentHandler () |
| Return the current content handler.
|
virtual void | setErrorHandler (IN(org::xml::sax::RErrorHandler) handler) |
virtual org::xml::sax::RErrorHandler | getErrorHandler () |
| Return the current error handler.
|
virtual void | parse (IN(org::xml::sax::RInputSource) input) throw ( acdk::io::RIOException , org::xml::sax::RSAXException ) |
virtual void | parse (IN(RString) systemId) throw ( acdk::io::RIOException , org::xml::sax::RSAXException ) |
| Parse an XML document from a system identifier (URI).
|
org::w3c::dom::RDocument | parseInternal (IN(org::xml::sax::RInputSource) input) throw ( acdk::io::RIOException , org::xml::sax::RSAXException ) |
org::w3c::dom::RDocument | parseInternal (IN(RString) systemId) throw ( acdk::io::RIOException , org::xml::sax::RSAXException ) |
org::w3c::dom::RDocument | parseInternalHtml (IN(org::xml::sax::RInputSource) input) throw ( acdk::io::RIOException , org::xml::sax::RSAXException ) |
RString | getURI (IN(RString) prefix) |
void | setExtendedFlags (int flags) |
int | getExtendedFlags () |
bool | useNamespace () |
bool | isValidating () |
void | _startDTD (IN(RString) name, IN(RString) externalID, IN(RString) systemID) |
acdk::io::RReader | _resolveEntity (IN(RString) publicId, IN(RString) systemId) |
void | _startDocument (bool isStandalone) |
void | _endDocument () |
void | _internalEntityDecl (IN(RString) name, IN(RString) value) |
void | _externalEntityDecl (IN(RString) name, IN(RString) publicId, IN(RString) systemId) |
void | _notationDecl (IN(RString) name, IN(RString) publicId, IN(RString) systemId) |
void | _attributeDecl (IN(RString) elementName, IN(RString) attributeName, IN(RString) type, IN(RString) mode, IN(RString) value) |
void | _elementDecl (IN(RString) name, IN(RString) model) |
void | _unparsedEntityDecl (IN(RString) name, IN(RString) publicId, IN(RString) systemId, IN(RString) notationName) |
void | _startElement (IN(RString) name, IN(org::xml::sax::RAttributes) attrs) |
void | _startElement (IN(RString) name, IN(RStringArray) attrs) |
void | _setDocumentLocator (IN(org::xml::sax::RLocator) loc) |
void | _endElement (IN(RString) name) |
void | _startPrefixMapping (IN(RString) prefix, IN(RString) uri) |
void | _characters (IN(RString) text) |
void | _ignorableWhitespace (IN(RString) text) |
void | _processingInstruction (IN(RString) target, IN(RString) data) |
void | _comment (IN(RString) text) |
void | _cdataBlock (IN(RString) text) |
void | _warning (IN(RString) message, int lineNumber, int columnNumber, IN(RString) publicId, IN(RString) systemId) |
void | _error (IN(RString) message, int lineNumber, int columnNumber, IN(RString) publicId, IN(RString) systemId) |
void | _fatalError (IN(RString) message, int lineNumber, int columnNumber, IN(RString) publicId, IN(RString) systemId) |
bool | hasAlreadyFatalError () |
bool | setFatalError () |
Public Attributes |
bool | _seenStartDocument |
Protected Attributes |
org::xml::sax::REntityResolver | _entityResolver |
org::xml::sax::RDTDHandler | _dtdHandler |
org::xml::sax::RContentHandler | _contentHandler |
org::xml::sax::RErrorHandler | _errorHandler |
org::xml::sax::RDeclHandler | _declarationHandler |
org::xml::sax::RLexicalHandler | _lexicalHandler |
bool | _hasAlreadyFatal |
org::xml::sax::helpers::RNamespaceSupport | _ns |
org::xml::sax::RLocator | _locator |
RString | _baseURI |
int | _extendedFlags |
Private Member Functions |
void | _checkFeatureName (IN(RString) name) |
void | _splitName (IN(RString) fqName, OUT(RString) localName, OUT(RString) prefix, OUT(RString) uri) |
void | _evaluteExtendedFlags () |
Constructor & Destructor Documentation
acdk::xml::sax::XMLReader::XMLReader |
( |
bool |
useNamespace = true, |
|
|
int |
xmlFlags = XMLRF_DEFAULTFLAGS |
|
) |
[inline] |
|
acdk::xml::sax::XMLReader::~XMLReader |
( |
|
) |
[inline] |
|
Member Function Documentation
void acdk::xml::sax::XMLReader::_cdataBlock |
( |
IN(RString) |
text |
) |
|
|
void acdk::xml::sax::XMLReader::_characters |
( |
IN(RString) |
text |
) |
|
|
void acdk::xml::sax::XMLReader::_checkFeatureName |
( |
IN(RString) |
name |
) |
[private] |
|
void acdk::xml::sax::XMLReader::_comment |
( |
IN(RString) |
text |
) |
|
|
void acdk::xml::sax::XMLReader::_elementDecl |
( |
IN(RString) |
name, |
|
|
IN(RString) |
model |
|
) |
|
|
void acdk::xml::sax::XMLReader::_endDocument |
( |
|
) |
|
|
void acdk::xml::sax::XMLReader::_endElement |
( |
IN(RString) |
name |
) |
|
|
void acdk::xml::sax::XMLReader::_error |
( |
IN(RString) |
message, |
|
|
int |
lineNumber, |
|
|
int |
columnNumber, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId |
|
) |
|
|
void acdk::xml::sax::XMLReader::_evaluteExtendedFlags |
( |
|
) |
[private] |
|
void acdk::xml::sax::XMLReader::_externalEntityDecl |
( |
IN(RString) |
name, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId |
|
) |
|
|
void acdk::xml::sax::XMLReader::_fatalError |
( |
IN(RString) |
message, |
|
|
int |
lineNumber, |
|
|
int |
columnNumber, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId |
|
) |
|
|
void acdk::xml::sax::XMLReader::_ignorableWhitespace |
( |
IN(RString) |
text |
) |
|
|
void acdk::xml::sax::XMLReader::_internalEntityDecl |
( |
IN(RString) |
name, |
|
|
IN(RString) |
value |
|
) |
|
|
void acdk::xml::sax::XMLReader::_notationDecl |
( |
IN(RString) |
name, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId |
|
) |
|
|
void acdk::xml::sax::XMLReader::_processingInstruction |
( |
IN(RString) |
target, |
|
|
IN(RString) |
data |
|
) |
|
|
void acdk::xml::sax::XMLReader::_startDocument |
( |
bool |
isStandalone |
) |
|
|
void acdk::xml::sax::XMLReader::_startDTD |
( |
IN(RString) |
name, |
|
|
IN(RString) |
externalID, |
|
|
IN(RString) |
systemID |
|
) |
|
|
void acdk::xml::sax::XMLReader::_startPrefixMapping |
( |
IN(RString) |
prefix, |
|
|
IN(RString) |
uri |
|
) |
|
|
void acdk::xml::sax::XMLReader::_unparsedEntityDecl |
( |
IN(RString) |
name, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId, |
|
|
IN(RString) |
notationName |
|
) |
|
|
void acdk::xml::sax::XMLReader::_warning |
( |
IN(RString) |
message, |
|
|
int |
lineNumber, |
|
|
int |
columnNumber, |
|
|
IN(RString) |
publicId, |
|
|
IN(RString) |
systemId |
|
) |
|
|
int acdk::xml::sax::XMLReader::getExtendedFlags |
( |
|
) |
[inline] |
|
|
Look up the value of a feature flag.
The feature name is any fully-qualified URI. It is possible for an XMLReader to recognize a feature name but temporarily be unable to return its value. Some feature values may be available only in specific contexts, such as before, during, or after a parse. Also, some feature values may not be programmatically accessible. (In the case of an adapter for SAX1 Parser, there is no implementation-independent way to expose whether the underlying parser is performing validation, expanding external entities, and so forth.)
All XMLReaders are required to recognize the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes feature names.
Typical usage is something like this:
// try to activate validation
try {
r.setFeature(http://xml.org/sax/features/validation, true);
} catch ( SAXException e) {
System.err.println(Cannot activate validation.);
}
// register event handlers
r.setContentHandler(new MyContentHandler());
r.setErrorHandler(new MyErrorHandler());
// parse the first document
try {
r.parse(http://www.foo.com/mydoc.xml);
} catch ( IOException e) {
System.err.println(I/O exception reading XML document);
} catch ( SAXException e) {
System.err.println(XML exception reading document.);
}
Implementors are free (and encouraged) to invent their own features, using names built on their own URIs.
- Parameters:
-
name | The feature name, which is a fully-qualified URI. |
- Returns:
- The current value of the feature (true or false).
- Exceptions:
-
- See also:
- setFeature
Implements org::xml::sax::XMLReader. |
|
Look up the value of a property.
The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but temporarily be unable to return its value. Some property values may be available only in specific contexts, such as before, during, or after a parse.
XMLReaders are not required to recognize any specific property names, though an initial core set is documented for SAX2.
Implementors are free (and encouraged) to invent their own properties, using names built on their own URIs.
- Parameters:
-
name | The property name, which is a fully-qualified URI. |
- Returns:
- The current value of the property.
- Exceptions:
-
- See also:
- setProperty
Implements org::xml::sax::XMLReader. |
bool acdk::xml::sax::XMLReader::hasAlreadyFatalError |
( |
|
) |
|
|
bool acdk::xml::sax::XMLReader::isValidating |
( |
|
) |
[inline] |
|
|
Parse an XML document from a system identifier (URI).
This method is a shortcut for the common case of reading a document from a system identifier. It is the exact equivalent of the following:
If the system identifier is a URL, it must be fully resolved by the application before it is passed to the parser.
- Parameters:
-
systemId | The system identifier (URI). |
- Exceptions:
-
org.xml.sax.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. |
- See also:
- parse(org::xml::sax::InputSource)
Implements org::xml::sax::XMLReader. |
void acdk::xml::sax::XMLReader::setExtendedFlags |
( |
int |
flags |
) |
[inline] |
|
bool acdk::xml::sax::XMLReader::setFatalError |
( |
|
) |
|
|
|
Set the value of a property.
The property name is any fully-qualified URI. It is possible for an XMLReader to recognize a property name but to be unable to change the current value. Some property values may be immutable or mutable only in specific contexts, such as before, during, or after a parse.
XMLReaders are not required to recognize setting any specific property names, though a core set is defined by SAX2.
This method is also the standard mechanism for setting extended handlers.
- Parameters:
-
name | The property name, which is a fully-qualified URI. |
value | The requested value for the property. |
- Exceptions:
-
Implements org::xml::sax::XMLReader. |
bool acdk::xml::sax::XMLReader::useNamespace |
( |
|
) |
[inline] |
|
Member Data Documentation
|
|