JAXP 1.0

JAXP provides an abstraction layer over the process of getting a vendor’s implementation of a SAX or DOM parser. Currently, JAXP supports SAX 1.0 and DOM Level 1 parser implementations only.

Package: javax.xml.parsers

This is the single package used in JAXP, and details the classes needed for the JAXP abstraction and pluggability layer.

DocumentBuilder

This class is the wrapper over an underlying parser implementation class. It allows parsing to occur in a vendor-neutral way.

public abstract class DocumentBuilder {
    public Document parse(InputStream stream)
        throws SAXException, IOException, IllegalArgumentException;
    public Document parse(String uri)
        throws SAXException, IOException, IllegalArgumentException;
    public Document parse(File file)
        throws SAXException, IOException, IllegalArgumentException;
    public abstract Document parse(InputSource source)
        throws SAXException, IOException, IllegalArgumentException;
    public abstract Document newDocument(  );
    public abstract boolean isNamespaceAware(  );
    public abstract boolean isValidating(  );
    public abstract void setEntityResolver(EntityResolver er);
    public abstract void setErrorHandler(ErrorHandler eh);
}

DocumentBuilderFactory

This class is the factory used to create instances of the DocumentBuilder class, and allows namespace and validation features to be set for the production of those instances.

public abstract class DocumentBuilderFactory {
    protected DocumentBuilderFactory(  );
    public static DocumentBuilderFactory newInstance(  );
    public abstract DocumentBuilder newDocumentBuilder(  )
        throws ParserConfigurationException;
    public void setNamespaceAware(boolean aware);
    public void setValidating(boolean validating);
    public boolean isNamespaceAware(  );
    public boolean isValidating(  );
}

FactoryConfigurationException

This defines an Error that is thrown if a factory instance cannot be created.

public class FactoryConfigurationException extends Error {
    public FactoryConfigurationError(  );
    public FactoryConfigurationError(String msg);
    public FactoryConfigurationError(Exception e);
    public FactoryConfigurationError(Exception e, String msg);
    public Exception getException(  );
}

ParserConfigurationException

This defines an Exception that is thrown if a parser is requested but cannot be constructed with the specified validation and namespace-awareness settings.

public class ParserConfigurationException extends Exception {
    public ParserConfigurationException(  );
    public ParserConfigurationException(String msg);
}

SAXParser

This class is the wrapper over an underlying SAX 1.0 parser implementation class, and allows parsing to occur in a vendor-neutral way.

public abstract class SAXParser {
    public void parse(InputStream stream, HandlerBase base)
        throws SAXException, IOException, IllegalArgumentException;
    public void parse(String uri, HandlerBase base)
        throws SAXException, IOException, IllegalArgumentException;
    public void parse(File file, HandlerBase base)
        throws SAXException, IOException, IllegalArgumentException;
    public void parse(InputSource source, HandlerBase base)
        throws SAXException, IOException, IllegalArgumentException;
    public abstract Parser getParser(  ) throws SAXException;
    public abstract boolean isNamespaceAware(  );
    public abstract boolean isValidating(  );
}

SAXParserFactory

This class is the factory used to create instances of the SAXParser class, and allows namespace and validation features to be set for the production of those instances.

public abstract class SAXParserFactory {
    public static SAXParserFactory newInstance(  );
    public SAXParser newSAXParser(  )
        throws ParserConfigurationException, SAXException;
    public void setNamespaceAware(boolean aware);
    public void setValidating(boolean validating);
    public boolean isNamespaceAware(  );
    public boolean isValidating(  );
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.218.45