|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.ims.xms.XMSParser
This is the main XMS parser class. It uses the abstract Xerces SAX parser with a document scanner, a dtd scanner, and a validator, as well as a grammar pool.
Field Summary | |
protected java.lang.String |
defaultNamespace
|
protected java.util.Stack |
elementStack
|
protected XMSDocumentHandler |
fXMSDocHandler
|
protected static java.lang.String |
NAMESPACES_FEATURE_ID
Namespaces feature id (http://xml.org/sax/features/namespaces). |
protected static java.lang.String |
NOTIFY_BUILTIN_REFS
Feature identifier: notify built-in refereces. |
protected static java.lang.String |
NOTIFY_CHAR_REFS_FEATURE_ID
Character ref notification feature id (http://apache.org/xml/features/scanner/notify-char-refs). |
protected static java.lang.String |
SCHEMA_FULL_CHECKING_FEATURE_ID
Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking). |
protected static java.lang.String |
SCHEMA_VALIDATION_FEATURE_ID
Schema validation feature id (http://apache.org/xml/features/validation/schema). |
protected static java.lang.String |
SYMBOL_TABLE
Property identifier: symbol table. |
protected static java.lang.String |
VALIDATION_FEATURE_ID
Validation feature id (http://xml.org/sax/features/validation). |
protected static java.lang.String |
XMLGRAMMAR_POOL
Property identifier: XML grammar pool. |
protected org.apache.xerces.xni.parser.XMLInputSource |
xmlInputSource
|
protected org.apache.xerces.xni.grammars.XSGrammar |
xsGrammar
|
Constructor Summary | |
XMSParser(org.apache.xerces.xni.grammars.XSGrammar xsGrammar,
org.apache.xerces.util.SymbolTable symbolTable,
org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Constructs a XMS parser using the specified symbol Table and grammar Pool. |
Method Summary | |
protected java.lang.StringBuffer |
buildOpenTag(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
|
protected void |
buildSideSegments()
|
void |
characters(char[] array,
int offset,
int length)
Accepts characters from an intact source. |
void |
characters(org.apache.xerces.xni.XMLString text,
org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
protected void |
consumeIntact(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
Consumes intact sub-tree as clob strait from reader until we a close element for passed in element |
void |
endDocument(org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
void |
endElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
void |
endGeneralEntity(java.lang.String name,
org.apache.xerces.xni.Augmentations augs)
|
protected void |
finishedIntact(org.apache.xerces.xni.QName element)
Consumes intact sub-tree as clob strait from reader until we a close element for passed in element |
XMSDocumentHandler |
getXMSDocumentHandler()
Returns the registered document handler. |
protected int |
getXMSType(java.lang.String name)
Returns the type of the passed in element. |
boolean |
parse(boolean complete)
Parses the document in a pull parsing fashion. |
void |
processingInstruction(java.lang.String target,
org.apache.xerces.xni.XMLString data,
org.apache.xerces.xni.Augmentations augs)
|
void |
reset()
Resets all components before parsing |
void |
setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource)
Sets the input source to parse. |
void |
setXMSDocumentHandler(XMSDocumentHandler xmsDocumentHandler)
Sets the document handler to receive information about the document. |
void |
startDocument(org.apache.xerces.xni.XMLLocator locator,
java.lang.String encoding,
org.apache.xerces.xni.NamespaceContext namespaceContext,
org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
void |
startElement(org.apache.xerces.xni.QName element,
org.apache.xerces.xni.XMLAttributes attributes,
org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
void |
startGeneralEntity(java.lang.String name,
org.apache.xerces.xni.XMLResourceIdentifier identifier,
java.lang.String encoding,
org.apache.xerces.xni.Augmentations augs)
Intercept XMLDocumentHandler call and call XMSDocumentHandler interface. |
Field Detail |
protected static final java.lang.String NAMESPACES_FEATURE_ID
protected static final java.lang.String VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID
protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID
protected static final java.lang.String NOTIFY_CHAR_REFS_FEATURE_ID
protected static final java.lang.String NOTIFY_BUILTIN_REFS
protected static final java.lang.String SYMBOL_TABLE
protected static final java.lang.String XMLGRAMMAR_POOL
protected XMSDocumentHandler fXMSDocHandler
protected java.lang.String defaultNamespace
protected java.util.Stack elementStack
protected org.apache.xerces.xni.grammars.XSGrammar xsGrammar
protected org.apache.xerces.xni.parser.XMLInputSource xmlInputSource
Constructor Detail |
public XMSParser(org.apache.xerces.xni.grammars.XSGrammar xsGrammar, org.apache.xerces.util.SymbolTable symbolTable, org.apache.xerces.xni.grammars.XMLGrammarPool grammarPool)
Method Detail |
public void setInputSource(org.apache.xerces.xni.parser.XMLInputSource inputSource) throws org.apache.xerces.xni.parser.XMLConfigurationException, java.io.IOException
inputSource
- The document's input source.XMLConfigurationException
- Thrown if there is a
configuration error when initializing the
parser.java.io.IOException
- Thrown on I/O error.parse(boolean)
public boolean parse(boolean complete) throws java.io.IOException, org.apache.xerces.xni.parser.XMLParseException
complete
- True if the pull parser should parse the
remaining document completely.XNIException
- Any XNI 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 parser.setInputSource(org.apache.xerces.xni.parser.XMLInputSource)
public void reset() throws org.apache.xerces.xni.XNIException
public void setXMSDocumentHandler(XMSDocumentHandler xmsDocumentHandler)
documentHandler
- The document handler.public XMSDocumentHandler getXMSDocumentHandler()
public void startDocument(org.apache.xerces.xni.XMLLocator locator, java.lang.String encoding, org.apache.xerces.xni.NamespaceContext namespaceContext, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void startGeneralEntity(java.lang.String name, org.apache.xerces.xni.XMLResourceIdentifier identifier, java.lang.String encoding, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void endGeneralEntity(java.lang.String name, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void characters(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
public void endElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void processingInstruction(java.lang.String target, org.apache.xerces.xni.XMLString data, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
public void endDocument(org.apache.xerces.xni.Augmentations augs)
public void characters(char[] array, int offset, int length)
characters
in interface XMSIntactXMLHandler
com.ibm.ims.xms.XMSIntactXMLHandler
charArray
- The array of characters snooped. This array will be reused, it is up to the implementor
to immediately use or copy the passed in characters.protected java.lang.StringBuffer buildOpenTag(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws org.apache.xerces.xni.XNIException
protected void consumeIntact(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attributes, org.apache.xerces.xni.Augmentations augs) throws java.io.IOException, org.apache.xerces.xni.XNIException
protected void finishedIntact(org.apache.xerces.xni.QName element) throws org.apache.xerces.xni.XNIException
protected void buildSideSegments() throws org.apache.xerces.xni.XNIException
protected int getXMSType(java.lang.String name)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |