|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.stream.XMLScanner
com.sun.xml.stream.XMLDocumentFragmentScannerImpl
com.sun.xml.stream.XMLDocumentScannerImpl
com.sun.xml.stream.XMLNSDocumentScannerImpl
public class XMLNSDocumentScannerImpl
This class adds the functionality of namespace processing. This class has been modified as per the new design which is more suited to efficiently build pull parser. Lot of improvements have been done and the code has been added to support stax functionality/features. This class scans an XML document, checks if document has a DTD, and if DTD is not found the scanner will remove the DTD Validator from the pipeline and perform namespace binding.
Nested Class Summary | |
---|---|
protected class |
XMLNSDocumentScannerImpl.NSContentDriver
Driver to handle content scanning. |
Nested classes/interfaces inherited from class com.sun.xml.stream.XMLDocumentScannerImpl |
---|
XMLDocumentScannerImpl.ContentDriver, XMLDocumentScannerImpl.DTDDriver, XMLDocumentScannerImpl.PrologDriver, XMLDocumentScannerImpl.TrailingMiscDriver, XMLDocumentScannerImpl.XMLBufferListenerImpl, XMLDocumentScannerImpl.XMLDeclDriver |
Nested classes/interfaces inherited from class com.sun.xml.stream.XMLDocumentFragmentScannerImpl |
---|
XMLDocumentFragmentScannerImpl.Driver, XMLDocumentFragmentScannerImpl.Element, XMLDocumentFragmentScannerImpl.ElementStack, XMLDocumentFragmentScannerImpl.ElementStack2, XMLDocumentFragmentScannerImpl.FragmentContentDriver |
Field Summary | |
---|---|
protected boolean |
fPerformValidation
If validating parser, make sure we report an error in the scanner if DTD grammar is missing. |
Constructor Summary | |
---|---|
XMLNSDocumentScannerImpl()
|
Method Summary | |
---|---|
protected XMLDocumentFragmentScannerImpl.Driver |
createContentDriver()
Creates a content driver. |
java.lang.String |
getCharacterEncodingScheme()
|
org.apache.xerces.util.XMLStringBuffer |
getDTDDecl()
|
org.apache.xerces.xni.QName |
getElementQName()
Return the information about the element -- If it is EndELement, QName values are computed dynamically. |
org.apache.xerces.xni.NamespaceContext |
getNamespaceContext()
|
void |
reset(PropertyManager propertyManager)
Resets the fields of this scanner. |
void |
reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
Resets the component. |
protected void |
scanAttribute(org.apache.xerces.util.XMLAttributesImpl attributes)
Scans an attribute. |
protected int |
scanEndElement()
Scans an end element. |
protected boolean |
scanStartElement()
Scans a start element. |
Methods inherited from class com.sun.xml.stream.XMLDocumentScannerImpl |
---|
endEntity, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, getScannerStateName, getScannetState, next, scanDoctypeDecl, setFeature, setInputSource, setProperty, startEntity |
Methods inherited from class com.sun.xml.stream.XMLDocumentFragmentScannerImpl |
---|
getAttributeIterator, getCharacterData, getComment, getDocumentHandler, getDriverName, getEntityName, getPIData, getPITarget, hasAttributes, isStandAlone, scanAttribute, scanCDATASection, scanCharReference, scanComment, scanContent, scanDocument, scanEntityReference, scanPIData, scanXMLDeclOrTextDecl, setDocumentHandler, setDriver, setScannerState, skipElement |
Methods inherited from class com.sun.xml.stream.XMLScanner |
---|
getFeature, isInvalid, isInvalidLiteral, isValidNameChar, isValidNameStartChar, isValidNCName, normalizeWhitespace, reportFatalError, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl, setPropertyManager, versionSupported |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean fPerformValidation
Constructor Detail |
---|
public XMLNSDocumentScannerImpl()
Method Detail |
---|
public void reset(PropertyManager propertyManager)
reset
in class XMLDocumentScannerImpl
public org.apache.xerces.xni.QName getElementQName()
protected boolean scanStartElement() throws java.io.IOException, org.apache.xerces.xni.XNIException
[44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>' [40] STag ::= '<' Name (S Attribute)* S? '>'
Note: This method assumes that the leading '<' character has been consumed.
Note: This method uses the fElementQName and fAttributes variables. The contents of these variables will be destroyed. The caller should copy important information out of these variables before calling this method.
scanStartElement
in class XMLDocumentFragmentScannerImpl
java.io.IOException
org.apache.xerces.xni.XNIException
protected void scanAttribute(org.apache.xerces.util.XMLAttributesImpl attributes) throws java.io.IOException, org.apache.xerces.xni.XNIException
[41] Attribute ::= Name Eq AttValue
Note: This method assumes that the next character on the stream is the first character of the attribute name.
Note: This method uses the fAttributeQName and fQName variables. The contents of these variables will be destroyed.
attributes
- The attributes list for the scanned attribute.
java.io.IOException
org.apache.xerces.xni.XNIException
protected int scanEndElement() throws java.io.IOException, org.apache.xerces.xni.XNIException
[42] ETag ::= '</' Name S? '>'
Note: This method uses the fElementQName variable. The contents of this variable will be destroyed. The caller should copy the needed information out of this variable before calling this method.
scanEndElement
in class XMLDocumentFragmentScannerImpl
java.io.IOException
org.apache.xerces.xni.XNIException
public org.apache.xerces.xni.NamespaceContext getNamespaceContext()
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) throws org.apache.xerces.xni.parser.XMLConfigurationException
XMLDocumentScannerImpl
reset
in interface org.apache.xerces.xni.parser.XMLComponent
reset
in class XMLDocumentScannerImpl
componentManager
- The component manager.
org.apache.xerces.xni.parser.XMLConfigurationException
protected XMLDocumentFragmentScannerImpl.Driver createContentDriver()
createContentDriver
in class XMLDocumentScannerImpl
public org.apache.xerces.util.XMLStringBuffer getDTDDecl()
public java.lang.String getCharacterEncodingScheme()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |