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: 571947 $, $Date: 2007-09-02 06:50:40 -0400 (Sun, 02 Sep 2007) $
|
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 |
DOMParser
public DOMParser()
throws XindiceException
setErrorHandler
public void setErrorHandler(org.xml.sax.ErrorHandler errors)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver entities)
throws org.xml.sax.SAXException
- Throws:
org.xml.sax.SAXException
parse
public void parse(String xml)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
parse
public void parse(Reader input)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
parse
public void parse(byte[] xml)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
parse
public void parse(Value value)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
parse
public void parse(org.xml.sax.InputSource source)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
parse
public void parse(InputStream input)
throws org.xml.sax.SAXException,
IOException
- Throws:
org.xml.sax.SAXException
IOException
toDocument
public static org.w3c.dom.Document toDocument(Reader input)
throws XindiceException
- Throws:
XindiceException
toDocument
public static org.w3c.dom.Document toDocument(byte[] xml)
throws XindiceException
- Throws:
XindiceException
toDocument
public static org.w3c.dom.Document toDocument(Value value)
throws XindiceException
- Throws:
XindiceException
toDocument
public static org.w3c.dom.Document toDocument(org.xml.sax.InputSource source)
throws XindiceException
- Throws:
XindiceException
toDocument
public static org.w3c.dom.Document toDocument(InputStream input)
throws XindiceException
- Throws:
XindiceException
toDocument
public static org.w3c.dom.Document toDocument(String xml)
throws XindiceException
- 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
- Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
notationDecl
public void notationDecl(String name,
String publicId,
String systemId)
throws org.xml.sax.SAXException
- Specified by:
notationDecl in interface org.xml.sax.DTDHandler
- Throws:
org.xml.sax.SAXException
unparsedEntityDecl
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws org.xml.sax.SAXException
- Specified by:
unparsedEntityDecl in interface org.xml.sax.DTDHandler
- Throws:
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator locator)
- Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
startDocument
public void startDocument()
throws org.xml.sax.SAXException
- Specified by:
startDocument in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Specified by:
endDocument in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
startPrefixMapping
public void startPrefixMapping(String prefix,
String uri)
throws org.xml.sax.SAXException
- Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
startElement
public void startElement(String uri,
String localName,
String qName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Specified by:
startElement in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(String uri,
String localName,
String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
characters in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
- Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
processingInstruction
public void processingInstruction(String target,
String data)
throws org.xml.sax.SAXException
- Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
skippedEntity
public void skippedEntity(String name)
throws org.xml.sax.SAXException
- Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
warning in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
error
public void error(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
error in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
- Specified by:
fatalError in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
elementDecl
public void elementDecl(String name,
String model)
throws org.xml.sax.SAXException
- Specified by:
elementDecl in interface org.xml.sax.ext.DeclHandler
- Throws:
org.xml.sax.SAXException
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
- Throws:
org.xml.sax.SAXException
internalEntityDecl
public void internalEntityDecl(String name,
String value)
throws org.xml.sax.SAXException
- Specified by:
internalEntityDecl in interface org.xml.sax.ext.DeclHandler
- Throws:
org.xml.sax.SAXException
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
- Throws:
org.xml.sax.SAXException
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
- Throws:
org.xml.sax.SAXException
endDTD
public void endDTD()
throws org.xml.sax.SAXException
- Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
startEntity
public void startEntity(String name)
throws org.xml.sax.SAXException
- Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
endEntity
public void endEntity(String name)
throws org.xml.sax.SAXException
- Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
startCDATA
public void startCDATA()
throws org.xml.sax.SAXException
- Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
endCDATA
public void endCDATA()
throws org.xml.sax.SAXException
- Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler
- Throws:
org.xml.sax.SAXException
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
- Throws:
org.xml.sax.SAXException
Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.