net.n3.nanoxml
Class XMLParserFactory

java.lang.Object
  extended by 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
static String CLASS_KEY
          The Java properties key of the XML parser class name.
static String DEFAULT_CLASS
          The class name of the default XML parser.
 
Constructor Summary
XMLParserFactory()
           
 
Method Summary
static IXMLParser createDefaultXMLParser()
          Creates a default parser.
static IXMLParser createDefaultXMLParser(IXMLBuilder builder)
          Creates a default parser.
static IXMLParser createXMLParser(String className, IXMLBuilder builder)
          Creates a parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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
Constructor Detail

XMLParserFactory

public XMLParserFactory()
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 created
IllegalAccessException - 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 created
IllegalAccessException - 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 parser
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 created
IllegalAccessException - if the parser could not be created