|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.framework.XMLParser | +--org.enhydra.xml.xmlc.parsers.xerces.XercesParser
Parse using the Xerces parser.
Nested Class Summary |
Nested classes inherited from class org.apache.xerces.framework.XMLDocumentHandler |
XMLDocumentHandler.DTDHandler |
Field Summary |
Fields inherited from class org.apache.xerces.framework.XMLParser |
fEntityHandler, fErrorReporter, fGrammarResolver, fParseInProgress, fScanner, fStringPool, fValidator, SAX2_FEATURES_PREFIX, SAX2_PROPERTIES_PREFIX, XERCES_FEATURES_PREFIX, XERCES_PROPERTIES_PREFIX |
Fields inherited from interface org.apache.xerces.framework.XMLErrorReporter |
ERRORTYPE_FATAL_ERROR, ERRORTYPE_RECOVERABLE_ERROR, ERRORTYPE_WARNING |
Constructor Summary | |
XercesParser()
|
Method Summary | |
void |
attlistDecl(QName elementDecl,
QName attributeDecl,
int attType,
boolean attList,
java.lang.String enumString,
int attDefaultType,
int attDefaultValue)
|
void |
characters(char[] ch,
int start,
int length)
Handle characters. |
void |
characters(int data)
Not used. |
void |
comment(int comment)
Handle a comment. |
void |
elementDecl(QName elementDecl,
int contentSpecType,
int contentSpecIndex,
XMLContentSpec.Provider contentSpecProvider)
|
void |
endCDATA()
Handle for end of CDATA section. |
void |
endDocument()
Handle end document. |
void |
endDTD()
callback for the end of the DTD This function will be called at the end of the DTD. |
void |
endElement(QName element)
Handle end element. |
void |
endEntityReference(int entityName,
int entityType,
int entityContext)
Handle the end of an entity reference. |
void |
endNamespaceDeclScope(int prefix)
Handle end of a namespace declaration scope. |
void |
externalEntityDecl(int entityName,
int publicId,
int systemId)
|
void |
externalPEDecl(int entityName,
int publicId,
int systemId)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Handle ignorable whitespace. |
void |
ignorableWhitespace(int data)
Not used. |
void |
internalEntityDecl(int entityName,
int entityValue)
|
void |
internalPEDecl(int entityName,
int entityValue)
|
void |
internalSubset(int internalSubset)
Supports DOM Level 2 internalSubset additions. |
void |
notationDecl(int notationName,
int publicId,
int systemId)
|
XMLCDocument |
parse(InputSource input,
LineNumberMap lineNumberMap,
XMLCDomFactory domFactory,
MetaData metaData,
ErrorReporter errorReporter,
ParseTracer tracer)
Parse a XML file (or any file, such as HTML, that can be converted into XML). |
void |
processingInstruction(int target,
int data)
Handle processing instruction. |
InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Resolve an entity. |
void |
startCDATA()
Handle start of CDATA section. |
void |
startDocument()
Handle start of document. |
void |
startDTD(QName rootElement,
int publicId,
int systemId)
callback for the start of the DTD This function will be called when a <!DOCTYPE...> declaration is encountered. |
void |
startElement(QName element,
XMLAttrList attrList,
int attrListHandle)
Handle start of element. |
void |
startEntityReference(int entityName,
int entityType,
int entityContext)
Handle the start of an entity reference. |
void |
startNamespaceDeclScope(int prefix,
int uri)
Handle start of a namespace declaration scope. |
void |
textDecl(int version,
int encoding)
Signal the Text declaration of an external entity. |
void |
unparsedEntityDecl(int entityName,
int publicId,
int systemId,
int notationName)
|
void |
xmlDecl(int version,
int encoding,
int standalone)
Signal the XML declaration of a document |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XercesParser()
Method Detail |
public XMLCDocument parse(InputSource input, LineNumberMap lineNumberMap, XMLCDomFactory domFactory, MetaData metaData, ErrorReporter errorReporter, ParseTracer tracer) throws java.io.IOException, XMLCException, SAXException
XMLCParser
parse
in interface XMLCParser
input
- The input source to parse.lineNumberMap
- If not null, a dynamic map of input stream
line numbers and offsets to source files and line numbers.
This object is dynamically updated as input is read. It may not
have valid mappings for characeters that have not been read.domFactory
- The DOM factory object.metaData
- MetaData for the document.errorReporter
- Object for reporting errors during the parse.tracer
- Object for parser info tracing.
XMLCException
- Thrown for fatal errors found parsing the
document.
java.io.IOException
SAXException
XMLCParser
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException
resolveEntity
in interface EntityResolver
publicId
- The public identifier of the external entity
being referenced, or null if none was supplied.systemId
- The system identifier of the external entity
being referenced.
java.io.IOException
- A Java-specific IO exception,
possibly the result of creating a new InputStream
or Reader for the InputSource.
SAXException
- Any SAX exception, possibly
wrapping another exception.EntityResolver.resolveEntity(java.lang.String, java.lang.String)
public void startDocument() throws java.lang.Exception
startDocument
in interface XMLDocumentHandler
java.lang.Exception
XMLDocumentHandler.startDocument()
public void endDocument() throws java.lang.Exception
endDocument
in interface XMLDocumentHandler
java.lang.Exception
XMLDocumentHandler.endDocument()
public void xmlDecl(int version, int encoding, int standalone) throws java.lang.Exception
XMLDocumentHandler
xmlDecl
in interface XMLDocumentHandler
version
- the handle in the string pool for the version numberencoding
- the handle in the string pool for the encoding
java.lang.Exception
XMLDocumentHandler.xmlDecl(int, int, int)
public void textDecl(int version, int encoding) throws java.lang.Exception
XMLDocumentHandler
textDecl
in interface XMLDocumentHandler
java.lang.Exception
XMLDocumentHandler.textDecl(int, int)
,
XMLDocumentHandler.DTDHandler#textDecl
public void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
startNamespaceDeclScope
in interface XMLDocumentHandler
prefix
- string pool index of the namespace prefix being declareduri
- string pool index of the namespace uri begin bound
java.lang.Exception
XMLDocumentHandler.startNamespaceDeclScope(int, int)
public void endNamespaceDeclScope(int prefix) throws java.lang.Exception
endNamespaceDeclScope
in interface XMLDocumentHandler
prefix
- string pool index of the namespace prefix being declared
java.lang.Exception
XMLDocumentHandler.startNamespaceDeclScope(int, int)
public void startElement(QName element, XMLAttrList attrList, int attrListHandle) throws java.lang.Exception
startElement
in interface XMLDocumentHandler
attrList
- attrList containing the attributes of the elementattrListHandle
- handle into attrList. Allows attributes to be retreived.
java.lang.Exception
XMLDocumentHandler.startElement(org.apache.xerces.utils.QName, org.apache.xerces.framework.XMLAttrList, int)
public void endElement(QName element) throws java.lang.Exception
endElement
in interface XMLDocumentHandler
java.lang.Exception
XMLDocumentHandler.endElement(org.apache.xerces.utils.QName)
public void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
startEntityReference
in interface XMLDocumentHandler
entityName
- string pool index of the entity nameentityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appears
java.lang.Exception
XMLDocumentHandler.startEntityReference(int, int, int)
public void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
endEntityReference
in interface XMLDocumentHandler
entityName
- string pool index of the entity anementityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appears
java.lang.Exception
XMLDocumentHandler.endEntityReference(int, int, int)
public void characters(int data) throws java.lang.Exception
characters
in interface XMLDocumentHandler
data
- string pool index of the characters that were scanned
java.lang.Exception
XMLDocumentHandler.characters(int)
public void ignorableWhitespace(int data) throws java.lang.Exception
ignorableWhitespace
in interface XMLDocumentHandler
data
- string pool index of ignorable whitespace
java.lang.Exception
XMLDocumentHandler.ignorableWhitespace(int)
public void startCDATA()
startCDATA
in interface XMLDocumentHandler
XMLDocumentHandler.startCDATA()
public void endCDATA()
endCDATA
in interface XMLDocumentHandler
XMLDocumentHandler.endCDATA()
public void processingInstruction(int target, int data) throws java.lang.Exception
processingInstruction
in interface XMLDocumentHandler
target
- string pool index of the PI targetdata
- string pool index of the PI data
java.lang.Exception
XMLDocumentHandler.processingInstruction(int, int)
,
XMLDocumentHandler.DTDHandler#processingInstruction
public void comment(int comment) throws java.lang.Exception
comment
in interface XMLDocumentHandler
comment
- string pool index of the comment text
java.lang.Exception
XMLDocumentHandler.comment(int)
public void characters(char[] ch, int start, int length) throws java.lang.Exception
characters
in interface XMLDocumentHandler
ch
- character array containing the characters that were scannedstart
- offset in ch where scanned characters beginlength
- length of scanned characters in ch
java.lang.Exception
XMLDocumentHandler.characters(int)
public void ignorableWhitespace(char[] ch, int start, int length) throws java.lang.Exception
ignorableWhitespace
in interface XMLDocumentHandler
ch
- character array containing the whitespace that was scannedstart
- offset in ch where scanned whitespace beginslength
- length of scanned whitespace in ch
java.lang.Exception
XMLDocumentHandler.ignorableWhitespace(int)
public void startDTD(QName rootElement, int publicId, int systemId)
XMLDocumentHandler.DTDHandler
startDTD
in interface XMLDocumentHandler.DTDHandler
publicId
- string pool index of the DTD's public IDsystemId
- string pool index of the DTD's system IDXMLDocumentHandler.DTDHandler#startDTD
public void internalSubset(int internalSubset)
XMLDocumentHandler.DTDHandler
internalSubset
in interface XMLDocumentHandler.DTDHandler
XMLDocumentHandler.DTDHandler#internalSubset
public void endDTD()
XMLDocumentHandler.DTDHandler
endDTD
in interface XMLDocumentHandler.DTDHandler
XMLDocumentHandler.DTDHandler#endDTD
public void elementDecl(QName elementDecl, int contentSpecType, int contentSpecIndex, XMLContentSpec.Provider contentSpecProvider) throws java.lang.Exception
elementDecl
in interface XMLDocumentHandler.DTDHandler
java.lang.Exception
XMLDocumentHandler.DTDHandler#elementDecl
public void attlistDecl(QName elementDecl, QName attributeDecl, int attType, boolean attList, java.lang.String enumString, int attDefaultType, int attDefaultValue) throws java.lang.Exception
attlistDecl
in interface XMLDocumentHandler.DTDHandler
attType
- type of attributeenumString
- String representing the values of the enumeration,
if the attribute is of enumerated type, or null if it is not.attDefaultType
- an integer value denoting the DefaultDecl valueattDefaultValue
- string pool index of this attribute's default value
or -1 if there is no defaultvalue
java.lang.Exception
XMLDocumentHandler.DTDHandler#attlistDecl
public void internalPEDecl(int entityName, int entityValue)
internalPEDecl
in interface XMLDocumentHandler.DTDHandler
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textXMLDocumentHandler.DTDHandler#internalPEDecl
public void externalPEDecl(int entityName, int publicId, int systemId)
externalPEDecl
in interface XMLDocumentHandler.DTDHandler
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.XMLDocumentHandler.DTDHandler#externalPEDecl
public void internalEntityDecl(int entityName, int entityValue)
internalEntityDecl
in interface XMLDocumentHandler.DTDHandler
entityName
- string pool index of the entity nameentityValue
- string pool index of the entity replacement textXMLDocumentHandler.DTDHandler#internalEntityDecl
public void externalEntityDecl(int entityName, int publicId, int systemId)
externalEntityDecl
in interface XMLDocumentHandler.DTDHandler
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.XMLDocumentHandler.DTDHandler#externalEntityDecl
public void unparsedEntityDecl(int entityName, int publicId, int systemId, int notationName)
unparsedEntityDecl
in interface XMLDocumentHandler.DTDHandler
entityName
- string pool index of the entity namepublicId
- string pool index of the entity's public id.systemId
- string pool index of the entity's system id.notationName
- string pool index of the notation name.XMLDocumentHandler.DTDHandler#unparsedEntityDecl
public void notationDecl(int notationName, int publicId, int systemId)
notationDecl
in interface XMLDocumentHandler.DTDHandler
notationName
- string pool index of the notation namepublicId
- string pool index of the notation's public id.systemId
- string pool index of the notation's system id.XMLDocumentHandler.DTDHandler#notationDecl
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |