|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.n3.nanoxml.StdXMLParser
public class StdXMLParser
StdXMLParser is the core parser of NanoXML.
| Constructor Summary | |
|---|---|
StdXMLParser()
Creates a new parser. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Cleans up the object when it's destroyed. |
IXMLBuilder |
getBuilder()
Returns the builder which creates the logical structure of the XML data. |
IXMLReader |
getReader()
Returns the reader from which the parser retrieves its data. |
IXMLEntityResolver |
getResolver()
Returns the entity resolver. |
IXMLValidator |
getValidator()
Returns the validator that validates the XML data. |
Object |
parse()
Parses the data and lets the builder create the logical data structure. |
protected void |
processAttribute(Vector attrNames,
Vector attrValues,
Vector attrTypes)
Processes an attribute of an element. |
protected void |
processCDATA()
Processes a CDATA section. |
protected void |
processDocType()
Processes a document type declaration. |
protected void |
processElement(String defaultNamespace,
Properties namespaces)
Processes a regular element. |
protected void |
processPI()
Processes a "processing instruction". |
protected void |
processSpecialTag(boolean allowCDATA)
Processes a tag that starts with a bang (<!...>). |
protected void |
scanData()
Scans the XML data for elements. |
protected void |
scanSomeTag(boolean allowCDATA,
String defaultNamespace,
Properties namespaces)
Scans an XML tag. |
void |
setBuilder(IXMLBuilder builder)
Sets the builder which creates the logical structure of the XML data. |
void |
setReader(IXMLReader reader)
Sets the reader from which the parser retrieves its data. |
void |
setResolver(IXMLEntityResolver resolver)
Sets the entity resolver. |
void |
setValidator(IXMLValidator validator)
Sets the validator that validates the XML data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StdXMLParser()
| Method Detail |
|---|
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic void setBuilder(IXMLBuilder builder)
setBuilder in interface IXMLParserbuilder - the non-null builderpublic IXMLBuilder getBuilder()
getBuilder in interface IXMLParserpublic void setValidator(IXMLValidator validator)
setValidator in interface IXMLParservalidator - the non-null validatorpublic IXMLValidator getValidator()
getValidator in interface IXMLParserpublic void setResolver(IXMLEntityResolver resolver)
setResolver in interface IXMLParserresolver - the non-null resolverpublic IXMLEntityResolver getResolver()
getResolver in interface IXMLParserpublic void setReader(IXMLReader reader)
setReader in interface IXMLParserreader - the readerpublic IXMLReader getReader()
getReader in interface IXMLParser
public Object parse()
throws XMLException
parse in interface IXMLParserXMLException - if an error occurred reading or parsing the dataIXMLBuilder.getResult()
protected void scanData()
throws Exception
Exception - if something went wrong
protected void scanSomeTag(boolean allowCDATA,
String defaultNamespace,
Properties namespaces)
throws Exception
allowCDATA - true if CDATA sections are allowed at this pointdefaultNamespace - the default namespace URI (or null)namespaces - list of defined namespaces
Exception - if something went wrong
protected void processPI()
throws Exception
Exception - if something went wrong
protected void processSpecialTag(boolean allowCDATA)
throws Exception
allowCDATA - true if CDATA sections are allowed at this point
Exception - if something went wrong
protected void processCDATA()
throws Exception
Exception - if something went wrong
protected void processDocType()
throws Exception
Exception - if an error occurred reading or parsing the data
protected void processElement(String defaultNamespace,
Properties namespaces)
throws Exception
defaultNamespace - the default namespace URI (or null)namespaces - list of defined namespaces
Exception - if something went wrong
protected void processAttribute(Vector attrNames,
Vector attrValues,
Vector attrTypes)
throws Exception
attrNames - contains the names of the attributes.attrValues - contains the values of the attributes.attrTypes - contains the types of the attributes.
Exception - if something went wrong
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||