electric.xml.sax
Class SAXParser

java.lang.Object
  extended byelectric.xml.sax.SAXParser
All Implemented Interfaces:
ISAXConstants, IXMLConstants, org.xml.sax.Locator, org.xml.sax.XMLReader

public class SAXParser
extends java.lang.Object
implements org.xml.sax.XMLReader, org.xml.sax.Locator, IXMLConstants, ISAXConstants

SAXParser.

Author:
webMethods

Field Summary
static int IGNORE_WHITESPACE
          Ignore whitespace during parsing.
 
Fields inherited from interface electric.xml.IXMLConstants
ATTLIST_START, ATTLIST_STOP, CDATA, CDATA_START, CDATA_STOP, CLOSE_TAG, COLON, COMMENT_START, COMMENT_STOP, DOCTYPE_START, DOCTYPE_STOP, ELEMENTDECL_START, ELEMENTDECL_STOP, ENCODING, ENTITYDECL_START, ENTITYDECL_STOP, ID, ID_CASE, INSTRUCTION_START, INSTRUCTION_STOP, NEGATIVE_INFINITY, NOT_A_NUMBER, NOTATIONDECL_START, NOTATIONDECL_STOP, NULL, OPEN_TAG, POSITIVE_INFINITY, PUBLIC, SPECIALS, STANDALONE, SUBSTITUTES, SYSTEM, UNDEFINED, VERSION, XML, XML_NAMESPACE, XMLDECL_START, XMLDECL_STOP, XMLNS, XMLNS_NAMESPACE
 
Fields inherited from interface electric.xml.sax.ISAXConstants
DECLARATION_HANDLER, DOM_NODE, EXTERNAL_GENERAL_ENTITIES, EXTERNAL_PARAMETER_ENTITIES, FEATURES, IS_STANDALONE, KEEP_WHITESPACE, KEEP_WHITESPACE_FLAG, LEXICAL_HANDLER, NAMESPACE_PREFIXES, NAMESPACES, PARAMETER_ENTITIES, PROPERTIES, RESOLVE_DTD_URIS, SAX_EXCEPTION, STRING_INTERNING, USE_ATTRIBUTES_2, USE_ENTITY_RESOLVER_2, USE_LOCATOR_2, VALIDATION, XML_STRING, XMLNS_URIS
 
Constructor Summary
SAXParser()
           
 
Method Summary
 int getColumnNumber()
          Return the column number where the current document event ends.
 org.xml.sax.ContentHandler getContentHandler()
          Return the current content handler.
 org.xml.sax.DTDHandler getDTDHandler()
          Return the current DTD handler.
 org.xml.sax.EntityResolver getEntityResolver()
          Return the current entity resolver.
 org.xml.sax.ErrorHandler getErrorHandler()
          Return the current error handler.
 boolean getFeature(java.lang.String name)
          Return the value of the named feature.
 int getLineNumber()
          Return the line number where the current document event ends.
 java.lang.Object getProperty(java.lang.String name)
          Return the value of the named property.
 java.lang.String getPublicId()
          Return the public identifier for the current document event.
 java.lang.String getSystemId()
          Return the system identifier for the current document event.
 void parse(byte[] bytes)
           
 void parse(java.io.File file)
           
 void parse(org.xml.sax.InputSource input)
          Parse an XML document.
 void parse(java.io.InputStream stream)
           
 void parse(java.lang.String url)
          Parse the XML document at the specified URL.
 void setContentHandler(org.xml.sax.ContentHandler handler)
          Set the current content handler.
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          Set the current DTD Handler.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          Set the current entity resolver;
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          Set the current error handler.
 void setFeature(java.lang.String name, boolean value)
          Set the value of the named feature.
 void setProperty(java.lang.String name, java.lang.Object value)
          Set the value of the named property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IGNORE_WHITESPACE

public static int IGNORE_WHITESPACE
Ignore whitespace during parsing.

Constructor Detail

SAXParser

public SAXParser()
Method Detail

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
Return the value of the named feature.

Specified by:
getFeature in interface org.xml.sax.XMLReader
Parameters:
name - The name of the feature.
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
Set the value of the named feature.

Specified by:
setFeature in interface org.xml.sax.XMLReader
Parameters:
name - The name of the feature.
value - The new value.
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
Set the value of the named property.

Specified by:
setProperty in interface org.xml.sax.XMLReader
Parameters:
name - The name of the property.
value - The new value.
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
Return the value of the named property.

Specified by:
getProperty in interface org.xml.sax.XMLReader
Parameters:
name -
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Return the current content handler.

Specified by:
getContentHandler in interface org.xml.sax.XMLReader

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Set the current content handler.

Specified by:
setContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The new value.

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
Return the current DTD handler.

Specified by:
getDTDHandler in interface org.xml.sax.XMLReader

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
Set the current DTD Handler.

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The new value.

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
Return the current error handler.

Specified by:
getErrorHandler in interface org.xml.sax.XMLReader

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
Set the current error handler.

Specified by:
setErrorHandler in interface org.xml.sax.XMLReader
Parameters:
handler - The new value.

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
Return the current entity resolver.

Specified by:
getEntityResolver in interface org.xml.sax.XMLReader

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
Set the current entity resolver;

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader
Parameters:
resolver - The new value.

parse

public void parse(org.xml.sax.InputSource input)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parse an XML document.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
input - The input.
Throws:
java.io.IOException - An I/O exception from the parser.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

parse

public void parse(java.lang.String url)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parse the XML document at the specified URL.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
url - A URL to the document to parse.
Throws:
java.io.IOException - An I/O exception from the parser.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

parse

public void parse(byte[] bytes)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parameters:
bytes -
Throws:
java.io.IOException - An I/O exception from the parser.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

parse

public void parse(java.io.InputStream stream)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parameters:
stream -
Throws:
java.io.IOException - An I/O exception from the parser.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

parse

public void parse(java.io.File file)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Parameters:
file -
Throws:
java.io.IOException - An I/O exception from the parser.
org.xml.sax.SAXException - Any SAX exception, possibly wrapping another exception.

getColumnNumber

public int getColumnNumber()
Return the column number where the current document event ends.

Specified by:
getColumnNumber in interface org.xml.sax.Locator

getLineNumber

public int getLineNumber()
Return the line number where the current document event ends.

Specified by:
getLineNumber in interface org.xml.sax.Locator

getPublicId

public java.lang.String getPublicId()
Return the public identifier for the current document event.

Specified by:
getPublicId in interface org.xml.sax.Locator

getSystemId

public java.lang.String getSystemId()
Return the system identifier for the current document event.

Specified by:
getSystemId in interface org.xml.sax.Locator


copyright© 2001-2004 by webMethods All Rights Reserved.