|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.n3.nanoxml.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
Throwable
public void setBuilder(IXMLBuilder builder)
setBuilder
in interface IXMLParser
builder
- the non-null builderpublic IXMLBuilder getBuilder()
getBuilder
in interface IXMLParser
public void setValidator(IXMLValidator validator)
setValidator
in interface IXMLParser
validator
- the non-null validatorpublic IXMLValidator getValidator()
getValidator
in interface IXMLParser
public void setResolver(IXMLEntityResolver resolver)
setResolver
in interface IXMLParser
resolver
- the non-null resolverpublic IXMLEntityResolver getResolver()
getResolver
in interface IXMLParser
public void setReader(IXMLReader reader)
setReader
in interface IXMLParser
reader
- the readerpublic IXMLReader getReader()
getReader
in interface IXMLParser
public Object parse() throws XMLException
parse
in interface IXMLParser
XMLException
- if an error occurred reading or parsing the dataIXMLBuilder.getResult()
protected void scanData() throws Exception
Exception
- if something went wrongprotected 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 wrongprotected void processPI() throws Exception
Exception
- if something went wrongprotected void processSpecialTag(boolean allowCDATA) throws Exception
allowCDATA
- true if CDATA sections are allowed at this point
Exception
- if something went wrongprotected void processCDATA() throws Exception
Exception
- if something went wrongprotected void processDocType() throws Exception
Exception
- if an error occurred reading or parsing the dataprotected void processElement(String defaultNamespace, Properties namespaces) throws Exception
defaultNamespace
- the default namespace URI (or null)namespaces
- list of defined namespaces
Exception
- if something went wrongprotected 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 |