Name

Package javax.xml.parsers

Synopsis

This package defines classes that represent XML parsers and factory classes for obtaining instances of those parser classes. DocumentBuilder is a DOM-based XML parser created from a DocumentBuilderFactory. SAXParser is a SAX-based XML parser created from a SAXParserFactory. In Java 5.0, you can configure either of the factory classes to create parsers that validate against a W3C XML Schema specified with a javax.xml.validation.Schema object. Note that this package does not include parser implementations. Instead, it is an implementation-independent layer that supports “pluggable” XML parsers. Furthermore, this package does not define a DOM or SAX API for working with XML documents. The DOM API is defined in org.w3c.dom, and the SAX API is defined in org.xml.sax and its subpackages.

Classes

public abstract class DocumentBuilder;
public abstract class DocumentBuilderFactory;
public abstract class SAXParser;
public abstract class SAXParserFactory;

Exceptions

public class ParserConfigurationException extends Exception;

Errors

public class FactoryConfigurationError extends Error;

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.