sdlip.xml.dom
Class DOMParser

java.lang.Object
  |
  +--sdlip.xml.dom.DOMParser

public class DOMParser
extends java.lang.Object
implements org.xml.sax.EntityResolver, org.xml.sax.DTDHandler, org.xml.sax.DocumentHandler, org.xml.sax.ErrorHandler


Constructor Summary
  DOMParser()
          Default constructor.
protected DOMParser(DocumentImpl d)
          used by XMLObjectImpl
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void doctype(java.lang.String name, java.lang.String publicID, java.lang.String systemID)
           
 void endDocument()
           
 void endElement(java.lang.String name)
          For each end of an element scope step back in the element and namespace stack
 void error(org.xml.sax.SAXParseException ex)
          Error.
 void fatalError(org.xml.sax.SAXParseException ex)
          Fatal error.
static java.lang.String getLocationString(org.xml.sax.SAXParseException ex)
          Returns a string of the location.
 void ignorableWhitespace(char[] ch, int start, int length)
           
 void notationDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
 Element parse(org.xml.sax.InputSource source)
           
 Element parse(org.xml.sax.InputSource source, java.lang.String parserClass)
          Parses the specified URI and returns the document.
 void processingInstruction(java.lang.String target, java.lang.String data)
           
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
           
 void setDocumentLocator(org.xml.sax.Locator locator)
           
 void startDocument()
           
 void startElement(java.lang.String name, org.xml.sax.AttributeList al)
          Called for each new element.
 void unparsedEntityDecl(java.lang.String name, java.lang.String publicId, java.lang.String systemId, java.lang.String notationName)
           
 void warning(org.xml.sax.SAXParseException ex)
          Warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMParser

public DOMParser()
Default constructor.

DOMParser

protected DOMParser(DocumentImpl d)
used by XMLObjectImpl
Method Detail

parse

public Element parse(org.xml.sax.InputSource source)
              throws java.lang.Exception

parse

public Element parse(org.xml.sax.InputSource source,
                     java.lang.String parserClass)
              throws java.lang.Exception
Parses the specified URI and returns the document.

warning

public void warning(org.xml.sax.SAXParseException ex)
Warning.
Specified by:
warning in interface org.xml.sax.ErrorHandler

error

public void error(org.xml.sax.SAXParseException ex)
Error.
Specified by:
error in interface org.xml.sax.ErrorHandler

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Fatal error.
Specified by:
fatalError in interface org.xml.sax.ErrorHandler

getLocationString

public static java.lang.String getLocationString(org.xml.sax.SAXParseException ex)
Returns a string of the location.

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver

notationDecl

public void notationDecl(java.lang.String name,
                         java.lang.String publicId,
                         java.lang.String systemId)
Specified by:
notationDecl in interface org.xml.sax.DTDHandler

unparsedEntityDecl

public void unparsedEntityDecl(java.lang.String name,
                               java.lang.String publicId,
                               java.lang.String systemId,
                               java.lang.String notationName)
Specified by:
unparsedEntityDecl in interface org.xml.sax.DTDHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
Specified by:
setDocumentLocator in interface org.xml.sax.DocumentHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.DocumentHandler

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Specified by:
endDocument in interface org.xml.sax.DocumentHandler

doctype

public void doctype(java.lang.String name,
                    java.lang.String publicID,
                    java.lang.String systemID)

startElement

public void startElement(java.lang.String name,
                         org.xml.sax.AttributeList al)
                  throws org.xml.sax.SAXException
Called for each new element. Build up the document tree using an element stack
Specified by:
startElement in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException - Passed on since we don't handle it.

endElement

public void endElement(java.lang.String name)
                throws org.xml.sax.SAXException
For each end of an element scope step back in the element and namespace stack
Specified by:
endElement in interface org.xml.sax.DocumentHandler
Throws:
org.xml.sax.SAXException - Passed on since we don't handle it.

characters

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

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
Specified by:
ignorableWhitespace in interface org.xml.sax.DocumentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
Specified by:
processingInstruction in interface org.xml.sax.DocumentHandler