Xindice API
version 1.1

org.apache.xindice.xml.dom
Class DOMParser

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.apache.xindice.xml.dom.DOMParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler

public final class DOMParser
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.DeclHandler, org.xml.sax.ext.LexicalHandler

DOMParser is the Xindice compressed DOM parser.

Version:
$Revision: 533273 $, $Date: 2007-04-27 20:51:37 -0400 (Fri, 27 Apr 2007) $

Constructor Summary
DOMParser()
           
 
Method Summary
 void attributeDecl(String eName, String aName, String type, String valueDefault, String value)
           
 void characters(char[] ch, int start, int length)
           
 void comment(char[] ch, int start, int length)
           
 void elementDecl(String name, String model)
           
 void endCDATA()
           
 void endDocument()
           
 void endDTD()
           
 void endElement(String uri, String localName, String qName)
           
 void endEntity(String name)
           
 void error(org.xml.sax.SAXParseException e)
           
 void externalEntityDecl(String name, String publicId, String systemId)
           
 void fatalError(org.xml.sax.SAXParseException e)
           
 org.w3c.dom.Document getDocument()
          Returns the parsed Document
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void internalEntityDecl(String name, String value)
           
 void notationDecl(String name, String publicId, String systemId)
           
 void parse(byte[] xml)
           
 void parse(org.xml.sax.InputSource source)
           
 void parse(InputStream input)
           
 void parse(Reader input)
           
 void parse(String xml)
           
 void parse(Value value)
           
 void processingInstruction(String target, String data)
           
 org.xml.sax.InputSource resolveEntity(String publicId, String systemId)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void setEntityResolver(org.xml.sax.EntityResolver entities)
           
 void setErrorHandler(org.xml.sax.ErrorHandler errors)
           
 void skippedEntity(String name)
           
 void startCDATA()
           
 void startDocument()
           
 void startDTD(String name, String publicId, String systemId)
           
 void startElement(String uri, String localName, String qName, org.xml.sax.Attributes attributes)
           
 void startEntity(String name)
           
 void startPrefixMapping(String prefix, String uri)
           
static org.w3c.dom.Document toDocument(byte[] xml)
           
static org.w3c.dom.Document toDocument(org.xml.sax.InputSource source)
           
static org.w3c.dom.Document toDocument(InputStream input)
           
static org.w3c.dom.Document toDocument(Reader input)
           
static org.w3c.dom.Document toDocument(String xml)
           
static org.w3c.dom.Document toDocument(Value value)
           
 void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)
           
 void warning(org.xml.sax.SAXParseException e)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMParser

public DOMParser()
          throws XindiceException
Method Detail

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler errors)
                     throws org.xml.sax.SAXException

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver entities)
                       throws org.xml.sax.SAXException

parse

public void parse(String xml)
           throws org.xml.sax.SAXException,
                  IOException

parse

public void parse(Reader input)
           throws org.xml.sax.SAXException,
                  IOException

parse

public void parse(byte[] xml)
           throws org.xml.sax.SAXException,
                  IOException

parse

public void parse(Value value)
           throws org.xml.sax.SAXException,
                  IOException

parse

public void parse(org.xml.sax.InputSource source)
           throws org.xml.sax.SAXException,
                  IOException

parse

public void parse(InputStream input)
           throws org.xml.sax.SAXException,
                  IOException

toDocument

public static org.w3c.dom.Document toDocument(Reader input)
                                       throws XindiceException

toDocument

public static org.w3c.dom.Document toDocument(byte[] xml)
                                       throws XindiceException

toDocument

public static org.w3c.dom.Document toDocument(Value value)
                                       throws XindiceException

toDocument

public static org.w3c.dom.Document toDocument(org.xml.sax.InputSource source)
                                       throws XindiceException

toDocument

public static org.w3c.dom.Document toDocument(InputStream input)
                                       throws XindiceException

toDocument

public static org.w3c.dom.Document toDocument(String xml)
                                       throws XindiceException

getDocument

public org.w3c.dom.Document getDocument()
Returns the parsed Document
Returns:
the parsed document

resolveEntity

public org.xml.sax.InputSource resolveEntity(String publicId,
                                             String systemId)
                                      throws org.xml.sax.SAXException
Overrides:
resolveEntity in class org.xml.sax.helpers.DefaultHandler

notationDecl

public void notationDecl(String name,
                         String publicId,
                         String systemId)
                  throws org.xml.sax.SAXException
Overrides:
notationDecl in class org.xml.sax.helpers.DefaultHandler

unparsedEntityDecl

public void unparsedEntityDecl(String name,
                               String publicId,
                               String systemId,
                               String notationName)
                        throws org.xml.sax.SAXException
Overrides:
unparsedEntityDecl in class org.xml.sax.helpers.DefaultHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Overrides:
setDocumentLocator in class org.xml.sax.helpers.DefaultHandler

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Overrides:
startDocument in class org.xml.sax.helpers.DefaultHandler

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Overrides:
endDocument in class org.xml.sax.helpers.DefaultHandler

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws org.xml.sax.SAXException
Overrides:
startPrefixMapping in class org.xml.sax.helpers.DefaultHandler

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws org.xml.sax.SAXException
Overrides:
endElement in class org.xml.sax.helpers.DefaultHandler

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Overrides:
ignorableWhitespace in class org.xml.sax.helpers.DefaultHandler

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws org.xml.sax.SAXException
Overrides:
processingInstruction in class org.xml.sax.helpers.DefaultHandler

skippedEntity

public void skippedEntity(String name)
                   throws org.xml.sax.SAXException
Overrides:
skippedEntity in class org.xml.sax.helpers.DefaultHandler

warning

public void warning(org.xml.sax.SAXParseException e)
             throws org.xml.sax.SAXException
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler

error

public void error(org.xml.sax.SAXParseException e)
           throws org.xml.sax.SAXException
Overrides:
error in class org.xml.sax.helpers.DefaultHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException e)
                throws org.xml.sax.SAXException
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler

elementDecl

public void elementDecl(String name,
                        String model)
                 throws org.xml.sax.SAXException
Specified by:
elementDecl in interface org.xml.sax.ext.DeclHandler

attributeDecl

public void attributeDecl(String eName,
                          String aName,
                          String type,
                          String valueDefault,
                          String value)
                   throws org.xml.sax.SAXException
Specified by:
attributeDecl in interface org.xml.sax.ext.DeclHandler

internalEntityDecl

public void internalEntityDecl(String name,
                               String value)
                        throws org.xml.sax.SAXException
Specified by:
internalEntityDecl in interface org.xml.sax.ext.DeclHandler

externalEntityDecl

public void externalEntityDecl(String name,
                               String publicId,
                               String systemId)
                        throws org.xml.sax.SAXException
Specified by:
externalEntityDecl in interface org.xml.sax.ext.DeclHandler

startDTD

public void startDTD(String name,
                     String publicId,
                     String systemId)
              throws org.xml.sax.SAXException
Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler

endDTD

public void endDTD()
            throws org.xml.sax.SAXException
Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler

startEntity

public void startEntity(String name)
                 throws org.xml.sax.SAXException
Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler

endEntity

public void endEntity(String name)
               throws org.xml.sax.SAXException
Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler

startCDATA

public void startCDATA()
                throws org.xml.sax.SAXException
Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler

endCDATA

public void endCDATA()
              throws org.xml.sax.SAXException
Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
Specified by:
comment in interface org.xml.sax.ext.LexicalHandler

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.