StdXMLParser is the core parser of NanoXML.
finalize
protected void finalize()
throws Throwable
Cleans up the object when it's destroyed.
getBuilder
public IXMLBuilder getBuilder()
Returns the builder which creates the logical structure of the XML data.
- getBuilder in interface IXMLParser
- the builder
parse
public Object parse()
throws XMLException
Parses the data and lets the builder create the logical data structure.
- parse in interface IXMLParser
- the logical structure built by the builder
XMLException
- if an error occurred reading or parsing the data
processAttribute
protected void processAttribute(Vector attrNames,
Vector attrValues,
Vector attrTypes)
throws Exception
Processes an attribute of an element.
attrNames
- contains the names of the attributes.attrValues
- contains the values of the attributes.attrTypes
- contains the types of the attributes.
processCDATA
protected void processCDATA()
throws Exception
Processes a CDATA section.
processDocType
protected void processDocType()
throws Exception
Processes a document type declaration.
processElement
protected void processElement(String defaultNamespace,
Properties namespaces)
throws Exception
Processes a regular element.
defaultNamespace
- the default namespace URI (or null)namespaces
- list of defined namespaces
processPI
protected void processPI()
throws Exception
Processes a "processing instruction".
processSpecialTag
protected void processSpecialTag(boolean allowCDATA)
throws Exception
Processes a tag that starts with a bang (<!...>).
allowCDATA
- true if CDATA sections are allowed at this point
scanData
protected void scanData()
throws Exception
Scans the XML data for elements.
scanSomeTag
protected void scanSomeTag(boolean allowCDATA,
String defaultNamespace,
Properties namespaces)
throws Exception
Scans an XML tag.
allowCDATA
- true if CDATA sections are allowed at this pointdefaultNamespace
- the default namespace URI (or null)namespaces
- list of defined namespaces
setBuilder
public void setBuilder(IXMLBuilder builder)
Sets the builder which creates the logical structure of the XML data.
- setBuilder in interface IXMLParser
builder
- the non-null builder
setReader
public void setReader(IXMLReader reader)
Sets the reader from which the parser retrieves its data.
- setReader in interface IXMLParser
reader
- the reader
setValidator
public void setValidator(IXMLValidator validator)
Sets the validator that validates the XML data.
- setValidator in interface IXMLParser
validator
- the non-null validator