Google

JAXPUtils (Apache Ant API)

org.apache.tools.ant.util
Class JAXPUtils


java.lang.Object

  |

  +--org.apache.tools.ant.util.JAXPUtils


public class JAXPUtils
extends java.lang.Object

Collection of helper methods that retrieve a ParserFactory or Parsers and Readers.

This class will create only a single factory instance.

Since:
Ant 1.5
Author:
Stefan Bodewig

Constructor Summary
JAXPUtils()
           
 
Method Summary
getParser()
          Returns a newly created SAX 1 Parser, using the default parser factory.
getParserFactory()
          Returns the parser factory to use.
getXMLReader()
          Returns a newly created SAX 2 XMLReader, using the default parser factory.
newParserFactory()
          Returns a new parser factory instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JAXPUtils


public JAXPUtils()
Method Detail

getParserFactory


                                                           throws BuildException
Returns the parser factory to use. Only one parser factory is ever created by this method and is then cached for future use.

Returns:
a SAXParserFactory to use
BuildException
Since:
Ant 1.5

newParserFactory


                                                           throws BuildException
Returns a new parser factory instance.

BuildException
Since:
Ant 1.5

getParser


                                    throws BuildException
Returns a newly created SAX 1 Parser, using the default parser factory.

Returns:
a SAX 1 Parser.
BuildException
Since:
Ant 1.5
See Also:
getParserFactory()

getXMLReader


                                          throws BuildException
Returns a newly created SAX 2 XMLReader, using the default parser factory.

Returns:
a SAX 2 XMLReader.
BuildException
Since:
Ant 1.5
See Also:
getParserFactory()


Copyright 2000-2002 Apache Software Foundation. All Rights Reserved.