org.inria.ns.reflex.xml
Interface ParserConfiguration

All Known Implementing Classes:
ParserConfiguration.Impl

public interface ParserConfiguration

An implementation should contain the settings expected to parse an XML document.

Settings : for example, a parser may be namespace aware or not, may preserve comments or not, may set a feature or a property...

A default namespaceaware configuration is provided.

Author:
Philippe Poulard
See Also:
NAMESPACEAWARE_PARSER_CONFIGURATION

Nested Class Summary
static class ParserConfiguration.Impl
          A standard configuration contains a set of flags and a set of attributes (features and properties) to set to a DOM or SAX parser.
 
Field Summary
static ParserConfiguration NAMESPACEAWARE_PARSER_CONFIGURATION
          A default configuration that parses documents with namespaces.
 
Method Summary
 DocumentBuilder newDocumentBuilder()
          Return a new DocumentBuilder that has the settings expected.
 XMLReader newXMLReader()
          Return an XMLReader that has the settings expected.
 

Field Detail

NAMESPACEAWARE_PARSER_CONFIGURATION

static final ParserConfiguration NAMESPACEAWARE_PARSER_CONFIGURATION
A default configuration that parses documents with namespaces.

Method Detail

newDocumentBuilder

DocumentBuilder newDocumentBuilder()
                                   throws ParserConfigurationException
Return a new DocumentBuilder that has the settings expected.

Returns:
A configured DocumentBuilder.
Throws:
ParserConfigurationException - If a parser with this settings can't be created.

newXMLReader

XMLReader newXMLReader()
                       throws SAXException
Return an XMLReader that has the settings expected.

Returns:
A configured XMLReader.
Throws:
SAXException - When a SAX parser with such a configuration can't be get.