net.n3.nanoxml
Class StdXMLParser
- java.lang.Object
-
- net.n3.nanoxml.StdXMLParser
-
- All Implemented Interfaces:
- IXMLParser
public class StdXMLParser extends java.lang.Object implements IXMLParser
StdXMLParser is the core parser of NanoXML.
-
-
Constructor Summary
Constructors Constructor and Description StdXMLParser()Creates a new parser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description IXMLBuildergetBuilder()Returns the builder which creates the logical structure of the XML data.IXMLReadergetReader()Returns the reader from which the parser retrieves its data.IXMLEntityResolvergetResolver()Returns the entity resolver.IXMLValidatorgetValidator()Returns the validator that validates the XML data.java.lang.Objectparse()Parses the data and lets the builder create the logical data structure.voidsetBuilder(IXMLBuilder builder)Sets the builder which creates the logical structure of the XML data.voidsetReader(IXMLReader reader)Sets the reader from which the parser retrieves its data.voidsetResolver(IXMLEntityResolver resolver)Sets the entity resolver.voidsetValidator(IXMLValidator validator)Sets the validator that validates the XML data.
-
-
-
Method Detail
-
setBuilder
public void setBuilder(IXMLBuilder builder)
Sets the builder which creates the logical structure of the XML data.- Specified by:
setBuilderin interfaceIXMLParser- Parameters:
builder- the non-null builder
-
getBuilder
public IXMLBuilder getBuilder()
Returns the builder which creates the logical structure of the XML data.- Specified by:
getBuilderin interfaceIXMLParser- Returns:
- the builder
-
setValidator
public void setValidator(IXMLValidator validator)
Sets the validator that validates the XML data.- Specified by:
setValidatorin interfaceIXMLParser- Parameters:
validator- the non-null validator
-
getValidator
public IXMLValidator getValidator()
Returns the validator that validates the XML data.- Specified by:
getValidatorin interfaceIXMLParser- Returns:
- the validator
-
setResolver
public void setResolver(IXMLEntityResolver resolver)
Sets the entity resolver.- Specified by:
setResolverin interfaceIXMLParser- Parameters:
resolver- the non-null resolver
-
getResolver
public IXMLEntityResolver getResolver()
Returns the entity resolver.- Specified by:
getResolverin interfaceIXMLParser- Returns:
- the non-null resolver
-
setReader
public void setReader(IXMLReader reader)
Sets the reader from which the parser retrieves its data.- Specified by:
setReaderin interfaceIXMLParser- Parameters:
reader- the reader
-
getReader
public IXMLReader getReader()
Returns the reader from which the parser retrieves its data.- Specified by:
getReaderin interfaceIXMLParser- Returns:
- the reader
-
parse
public java.lang.Object parse() throws XMLExceptionParses the data and lets the builder create the logical data structure.- Specified by:
parsein interfaceIXMLParser- Returns:
- the logical structure built by the builder
- Throws:
XMLException- if an error occurred reading or parsing the data- See Also:
IXMLBuilder.getResult()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG