Package net.n3.nanoxml
Class XMLParserFactory
- java.lang.Object
-
- net.n3.nanoxml.XMLParserFactory
-
public class XMLParserFactory extends Object
Creates an XML parser.- Version:
- $Name: RELEASE_2_2_1 $, $Revision: 1.3 $
- Author:
- Marc De Scheemaecker
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASS_KEYThe Java properties key of the XML parser class name.static StringDEFAULT_CLASSThe class name of the default XML parser.
-
Constructor Summary
Constructors Constructor Description XMLParserFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IXMLParsercreateDefaultXMLParser()Creates a default parser.static IXMLParsercreateDefaultXMLParser(IXMLBuilder builder)Creates a default parser.static IXMLParsercreateXMLParser(String className, IXMLBuilder builder)Creates a parser.
-
-
-
Field Detail
-
DEFAULT_CLASS
public static final String DEFAULT_CLASS
The class name of the default XML parser.- See Also:
- Constant Field Values
-
CLASS_KEY
public static final String CLASS_KEY
The Java properties key of the XML parser class name.- See Also:
- Constant Field Values
-
-
Method Detail
-
createDefaultXMLParser
public static IXMLParser createDefaultXMLParser() throws ClassNotFoundException, InstantiationException, IllegalAccessException
Creates a default parser.- Returns:
- the non-null parser.
- Throws:
ClassNotFoundException- if the class of the parser or validator could not be found.InstantiationException- if the parser could not be createdIllegalAccessException- if the parser could not be created- See Also:
DEFAULT_CLASS,CLASS_KEY
-
createDefaultXMLParser
public static IXMLParser createDefaultXMLParser(IXMLBuilder builder) throws ClassNotFoundException, InstantiationException, IllegalAccessException
Creates a default parser.- Parameters:
builder- the XML builder.- Returns:
- the non-null parser.
- Throws:
ClassNotFoundException- if the class of the parser could not be found.InstantiationException- if the parser could not be createdIllegalAccessException- if the parser could not be created- See Also:
DEFAULT_CLASS,CLASS_KEY
-
createXMLParser
public static IXMLParser createXMLParser(String className, IXMLBuilder builder) throws ClassNotFoundException, InstantiationException, IllegalAccessException
Creates a parser.- Parameters:
className- the name of the class of the XML parserbuilder- the XML builder.- Returns:
- the non-null parser.
- Throws:
ClassNotFoundException- if the class of the parser could not be found.InstantiationException- if the parser could not be createdIllegalAccessException- if the parser could not be created
-
-