APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.rowset.internal

public Class XmlReaderContentHandler

extends DefaultHandler
Class Inheritance
Imports
java.util.*, org.xml.sax.*, org.xml.sax.helpers.*, java.sql.*, javax.sql.*, javax.sql.rowset.*, com.sun.rowset.*, java.io.IOException, java.text.MessageFormat

The document handler that receives parse events that an XML parser sends while it is parsing an XML document representing a WebRowSet object. The parser sends strings to this XmlReaderContentHandler and then uses these strings as arguments for the XmlReaderContentHandler methods it invokes. The final goal of the SAX parser working with an XmlReaderContentHandler object is to read an XML document that represents a RowSet object.

A rowset consists of its properties, metadata, and data values. An XML document representing a rowset includes the values in these three categories along with appropriate XML tags to identify them. It also includes a top-level XML tag for the rowset and three section tags identifying the three categories of values.

The tags in an XML document are hierarchical. This means that the top-level tag, RowSet, is followed by the three sections with appropriate tags, which are in turn each followed by their constituent elements. For example, the properties element will be followed by an element for each of the properties listed in in this XmlReaderContentHandler object's properties field. The content of the other two fields, colDef, which lists the rowset's metadata elements, and data, which lists the rowset's data elements, are handled similarly .

This implementation of XmlReaderContentHandler provides the means for the parser to determine which elements need to have a value set and then to set those values. The methods in this class are all called by the parser; an application programmer never calls them directly.

Field Summary

Modifier and TypeField and Description
private static final int
AutoIncrementTag

A constant representing the tag for auto-increment.

private static final int
CaseSensitiveTag

A constant representing the tag for case-sensitive.

private static final int
CatalogNameTag

A constant representing the tag for catalog-name.

private String[]
colDef

A listing of the kinds of metadata information available about the columns in a WebRowSet object.

private HashMap<String, Integer>
private static final int
private static final int
ColumnCountTag

A constant representing the tag for column-count.

private static final int
ColumnDefinitionTag

A constant representing the tag for column-definition.

private static final int
ColumnDisplaySizeTag

A constant representing the tag for column-display-size.

private static final int
ColumnIndexTag

A constant representing the tag for column-index.

private static final int
ColumnLabelTag

A constant representing the tag for column-label.

private static final int
ColumnNameTag

A constant representing the tag for column-name.

private static final int
ColumnPrecisionTag

A constant representing the tag for column-precision.

private static final int
ColumnScaleTag

A constant representing the tag for column-scale.

private static final int
ColumnTypeNameTag

A constant representing the tag for column-type-name.

private static final int
ColumnTypeTag

A constant representing the tag for column-type.

private String
private static final int
CommandTag

A constant representing the tag for the command property.

private static final int
ConcurrencyTag

A constant representing the tag for the concurrency property.

private static final int
CurrencyTag

A constant representing the tag for currency.

private String[]
private static final int
DATA

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in data.

private HashMap<String, Integer>
private static final int
DataSourceLock

A constant representing the tag for the data source lock.

private static final int
DatasourceTag

A constant representing the tag for the datasource property.

private static final int
private static final int
private boolean
private static final int
EscapeProcessingTag

A constant representing the tag for the escape-processing property.

private static final int
FetchDirectionTag

A constant representing the tag for the fetch-direction property.

private static final int
FetchSizeTag

A constant representing the tag for the fetch-size property.

private int
private static final int
INITIAL

A constant indicating the state of this XmlReaderContentHandler object in which it has not yet been called by the SAX parser and therefore has no indication of what type of input to expect from the parser next.

private static final int
private static final int
private static final int
IsolationLevelTag

A constant representing the tag for the isolation-level property

private String
private Vector<String>
private static final int
KeycolsTag

A constant representing the tag for the key-columns property.

private String
private static final int
MapTag

A constant representing the tag for the map property.

private static final int
MaxFieldSizeTag

A constant representing the tag for the max-field-size property.

private static final int
MaxRowsTag

A constant representing the tag for the max-rows property.

private RowSetMetaData
private static final int
METADATA

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in colDef.

private String
private static final int
MetaNullTag

A constant representing the tag for null.

private static final int
MetaTableNameTag

A constant representing the tag for table-name.

private static final int
NullableTag

A constant representing the tag for nullable.

private static final int
private boolean
private static final int
PropClassTag

A constant representing the tag for the class property.

private static final int
PropColumnTag

A constant representing the tag for the column property.

private String[]
properties

A list of the properties for a rowset.

private static final int
PROPERTIES

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in properties.

private String
private HashMap<String, Integer>
private static final int
PropNullTag

A constant representing the tag for the null property.

private static final int
PropTypeTag

A constant representing the tag for the type property.

private static final int
QueryTimeoutTag

A constant representing the tag for the query-timeout property.

private static final int
ReadOnlyTag

A constant representing the tag for the read-only property.

private JdbcRowSetResourceBundle
private static final int
RowsetTypeTag

A constant representing the tag for the rowset-type property.

private static final int
private WebRowSetImpl
private static final int
SchemaNameTag

A constant representing the tag for schema-name.

private static final int
SearchableTag

A constant representing the tag for searchable.

private static final int
ShowDeletedTag

A constant representing the tag for the show-deleted property.

private static final int
SignedTag

A constant representing the tag for signed.

private int
private static final int
SyncProviderGradeTag

A constant representing the tag for the sync-provider grade tag.

private static final int
SyncProviderNameTag

A constant representing the tag for the sync-provider name

private static final int
SyncProviderTag

A constant representing the tag for the sync-provider.

private static final int
SyncProviderVendorTag

A constant representing the tag for the sync-provider vendor tag.

private static final int
SyncProviderVersionTag

A constant representing the tag for the sync-provider version tag.

private static final int
TableNameTag

A constant representing the tag for the table-name property.

private int
private String
private String
private String
private HashMap<String, Class<?>>
private Object[]
private Vector<Object[]>
private static final int
private static final int
UrlTag

A constant representing the tag for the URL property.

private String

Constructor Summary

AccessConstructor and Description
public
XmlReaderContentHandler(RowSet
the RowSet object in XML format that will be read
r
)

Constructs a new XmlReaderContentHandler object that will assist the SAX parser in reading a WebRowSet object in the format of an XML document.

Method Summary

Modifier and TypeMethod and Description
private void
public void
characters(char[]
an array of characters supplied by the SAX parser, all or part of which will be used to set a value
ch
,
int
the position in the given array at which to start
start
,
int
the number of consecutive characters to use
length
)

Overrides org.xml.sax.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Sets a property, metadata, or data value with the characters in the given array of characters, starting with the array element indicated by start and continuing for length number of characters.

public void
endDocument()

Overrides org.xml.sax.helpers.DefaultHandler.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Receive notification of the end of the document.

public void
endElement(String uri, String
the name of the element; either (1) one of the array elements in the fields properties, colDef, or data or (2) one of the RowSet elements "properties", "metadata", or "data"
lName
,
String qName)

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Sets the value for the given element if name is one of the array elements in the fields properties, colDef, or data and this XmlReaderContentHandler object's state is not INITIAL.

public void
error(SAXParseException
the SAXParseException object to throw
e
)

Overrides org.xml.sax.helpers.DefaultHandler.error.

Implements org.xml.sax.ErrorHandler.error.

Throws the given SAXParseException object.

private BigDecimal
private byte[]
private boolean
private byte
private Date
private double
private boolean
private float
private int
private long
private boolean
private Row

Returns:

the Row object on which the RowSet implementation objects's cursor is positioned
getPresentRow
(WebRowSetImpl rs)

Returns the current row of this Rowsetobject.

private short
private int

Returns:

one of the following constants: XmlReaderContentHandler.PROPERTIES XmlReaderContentHandler.METADATA XmlReaderContentHandler.DATA XmlReaderContentHandler.INITIAL
getState
()

Retrieves the current state of this XmlReaderContentHandler object's rowset, which is stored in the document handler's state field.

private String
private int
private Timestamp
private Time
private void
initMaps()

Creates and initializes three new HashMap objects that map the strings returned by the SAX parser to Integer objects.

private void
public void
notationDecl(String name, String publicId, String systemId)

Overrides org.xml.sax.helpers.DefaultHandler.notationDecl.

Implements org.xml.sax.DTDHandler.notationDecl.

Receive notification of a notation declaration.

private void
setDataValue(char[] ch, int start, int len)

private void
private void
private void
setNullValue(boolean n)

private void
private void
private void
setTag(int t)

public void
startDocument()

Overrides org.xml.sax.helpers.DefaultHandler.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

Receive notification of the beginning of the document.

public void
startElement(String uri, String
the name of the element; either (1) one of the array elements in the fields properties, colDef, or data or (2) one of the RowSet elements "properties", "metadata", or "data"
lName
,
String qName, Attributes
org.xml.sax.AttributeList objects that are attributes of the named section element; may be null if there are no attributes, which is the case for WebRowSet objects
attributes
)

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Sets this XmlReaderContentHandler object's tag field if the given name is the key for a tag and this object's state is not INITIAL.

public void
unparsedEntityDecl(String name, String publicId, String systemId, String notationName)

Overrides org.xml.sax.helpers.DefaultHandler.unparsedEntityDecl.

Implements org.xml.sax.DTDHandler.unparsedEntityDecl.

Receive notification of an unparsed entity declaration.

public void
warning(SAXParseException
a warning generated by the SAX parser
err
)

Overrides org.xml.sax.helpers.DefaultHandler.warning.

Implements org.xml.sax.ErrorHandler.warning.

Prints a warning message to System.out giving the line number and uri for what caused the warning plus a message explaining the reason for the warning.

Inherited from org.xml.sax.helpers.DefaultHandler:
endPrefixMappingfatalErrorignorableWhitespaceprocessingInstructionresolveEntitysetDocumentLocatorskippedEntitystartPrefixMapping

Field Detail

AutoIncrementTagback to summary
private static final int AutoIncrementTag

A constant representing the tag for auto-increment.

CaseSensitiveTagback to summary
private static final int CaseSensitiveTag

A constant representing the tag for case-sensitive.

CatalogNameTagback to summary
private static final int CatalogNameTag

A constant representing the tag for catalog-name.

colDefback to summary
private String[] colDef

A listing of the kinds of metadata information available about the columns in a WebRowSet object.

colDefMapback to summary
private HashMap<String, Integer> colDefMap
ColTagback to summary
private static final int ColTag
ColumnCountTagback to summary
private static final int ColumnCountTag

A constant representing the tag for column-count.

ColumnDefinitionTagback to summary
private static final int ColumnDefinitionTag

A constant representing the tag for column-definition.

ColumnDisplaySizeTagback to summary
private static final int ColumnDisplaySizeTag

A constant representing the tag for column-display-size.

ColumnIndexTagback to summary
private static final int ColumnIndexTag

A constant representing the tag for column-index.

ColumnLabelTagback to summary
private static final int ColumnLabelTag

A constant representing the tag for column-label.

ColumnNameTagback to summary
private static final int ColumnNameTag

A constant representing the tag for column-name.

ColumnPrecisionTagback to summary
private static final int ColumnPrecisionTag

A constant representing the tag for column-precision.

ColumnScaleTagback to summary
private static final int ColumnScaleTag

A constant representing the tag for column-scale.

ColumnTypeNameTagback to summary
private static final int ColumnTypeNameTag

A constant representing the tag for column-type-name.

ColumnTypeTagback to summary
private static final int ColumnTypeTag

A constant representing the tag for column-type.

columnValueback to summary
private String columnValue
CommandTagback to summary
private static final int CommandTag

A constant representing the tag for the command property.

ConcurrencyTagback to summary
private static final int ConcurrencyTag

A constant representing the tag for the concurrency property.

CurrencyTagback to summary
private static final int CurrencyTag

A constant representing the tag for currency.

databack to summary
private String[] data
DATAback to summary
private static final int DATA

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in data.

dataMapback to summary
private HashMap<String, Integer> dataMap
DataSourceLockback to summary
private static final int DataSourceLock

A constant representing the tag for the data source lock.

DatasourceTagback to summary
private static final int DatasourceTag

A constant representing the tag for the datasource property.

DelTagback to summary
private static final int DelTag
EmptyStringTagback to summary
private static final int EmptyStringTag
emptyStringValback to summary
private boolean emptyStringVal
EscapeProcessingTagback to summary
private static final int EscapeProcessingTag

A constant representing the tag for the escape-processing property.

FetchDirectionTagback to summary
private static final int FetchDirectionTag

A constant representing the tag for the fetch-direction property.

FetchSizeTagback to summary
private static final int FetchSizeTag

A constant representing the tag for the fetch-size property.

idxback to summary
private int idx
INITIALback to summary
private static final int INITIAL

A constant indicating the state of this XmlReaderContentHandler object in which it has not yet been called by the SAX parser and therefore has no indication of what type of input to expect from the parser next.

The state is set to INITIAL at the end of each section, which allows the sections to appear in any order and still be parsed correctly (except that metadata must be set before data values can be set).

InsDelTagback to summary
private static final int InsDelTag
InsTagback to summary
private static final int InsTag
IsolationLevelTagback to summary
private static final int IsolationLevelTag

A constant representing the tag for the isolation-level property

Key_mapback to summary
private String Key_map
keyColsback to summary
private Vector<String> keyCols
KeycolsTagback to summary
private static final int KeycolsTag

A constant representing the tag for the key-columns property.

lastvalback to summary
private String lastval
MapTagback to summary
private static final int MapTag

A constant representing the tag for the map property. This map is the type map that specifies the custom mapping for an SQL user-defined type.

MaxFieldSizeTagback to summary
private static final int MaxFieldSizeTag

A constant representing the tag for the max-field-size property.

MaxRowsTagback to summary
private static final int MaxRowsTag

A constant representing the tag for the max-rows property.

mdback to summary
private RowSetMetaData md
METADATAback to summary
private static final int METADATA

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in colDef.

metaDataValueback to summary
private String metaDataValue
MetaNullTagback to summary
private static final int MetaNullTag

A constant representing the tag for null.

MetaTableNameTagback to summary
private static final int MetaTableNameTag

A constant representing the tag for table-name.

NullableTagback to summary
private static final int NullableTag

A constant representing the tag for nullable.

NullTagback to summary
private static final int NullTag
nullValback to summary
private boolean nullVal
PropClassTagback to summary
private static final int PropClassTag

A constant representing the tag for the class property.

PropColumnTagback to summary
private static final int PropColumnTag

A constant representing the tag for the column property.

propertiesback to summary
private String[] properties

A list of the properties for a rowset. There is a constant defined to correspond to each of these properties so that a HashMap object can be created to map the properties, which are strings, to the constants, which are integers.

PROPERTIESback to summary
private static final int PROPERTIES

A constant indicating the state in which this XmlReaderContentHandler object expects the next input received from the SAX parser to be a string corresponding to one of the elements in properties.

propertyValueback to summary
private String propertyValue
propMapback to summary
private HashMap<String, Integer> propMap
PropNullTagback to summary
private static final int PropNullTag

A constant representing the tag for the null property.

PropTypeTagback to summary
private static final int PropTypeTag

A constant representing the tag for the type property.

QueryTimeoutTagback to summary
private static final int QueryTimeoutTag

A constant representing the tag for the query-timeout property.

ReadOnlyTagback to summary
private static final int ReadOnlyTag

A constant representing the tag for the read-only property.

resBundleback to summary
private JdbcRowSetResourceBundle resBundle
RowsetTypeTagback to summary
private static final int RowsetTypeTag

A constant representing the tag for the rowset-type property.

RowTagback to summary
private static final int RowTag
rsback to summary
private WebRowSetImpl rs
SchemaNameTagback to summary
private static final int SchemaNameTag

A constant representing the tag for schema-name.

SearchableTagback to summary
private static final int SearchableTag

A constant representing the tag for searchable.

ShowDeletedTagback to summary
private static final int ShowDeletedTag

A constant representing the tag for the show-deleted property.

SignedTagback to summary
private static final int SignedTag

A constant representing the tag for signed.

stateback to summary
private int state
SyncProviderGradeTagback to summary
private static final int SyncProviderGradeTag

A constant representing the tag for the sync-provider grade tag.

SyncProviderNameTagback to summary
private static final int SyncProviderNameTag

A constant representing the tag for the sync-provider name

SyncProviderTagback to summary
private static final int SyncProviderTag

A constant representing the tag for the sync-provider.

SyncProviderVendorTagback to summary
private static final int SyncProviderVendorTag

A constant representing the tag for the sync-provider vendor tag.

SyncProviderVersionTagback to summary
private static final int SyncProviderVersionTag

A constant representing the tag for the sync-provider version tag.

TableNameTagback to summary
private static final int TableNameTag

A constant representing the tag for the table-name property.

tagback to summary
private int tag
tempCommandback to summary
private String tempCommand
tempStrback to summary
private String tempStr
tempUpdateback to summary
private String tempUpdate
typeMapback to summary
private HashMap<String, Class<?>> typeMap
updback to summary
private Object[] upd
updatesback to summary
private Vector<Object[]> updates
UpdTagback to summary
private static final int UpdTag
UrlTagback to summary
private static final int UrlTag

A constant representing the tag for the URL property.

Value_mapback to summary
private String Value_map

Constructor Detail

XmlReaderContentHandlerback to summary
public XmlReaderContentHandler(RowSet r)

Constructs a new XmlReaderContentHandler object that will assist the SAX parser in reading a WebRowSet object in the format of an XML document. In addition to setting some default values, this constructor creates three HashMap objects, one for properties, one for metadata, and one for data. These hash maps map the strings sent by the SAX parser to integer constants so that they can be compared more efficiently in switch statements.

Parameters
r:RowSet

the RowSet object in XML format that will be read

Method Detail

applyUpdatesback to summary
private void applyUpdates() throws SAXException
charactersback to summary
public void characters(char[] ch, int start, int length) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.characters.

Implements org.xml.sax.ContentHandler.characters.

Sets a property, metadata, or data value with the characters in the given array of characters, starting with the array element indicated by start and continuing for length number of characters.

The SAX parser invokes this method and supplies the character array, start position, and length parameter values it got from parsing the XML document. An application programmer never invokes this method directly.

Parameters
ch:char[]

an array of characters supplied by the SAX parser, all or part of which will be used to set a value

start:int

the position in the given array at which to start

length:int

the number of consecutive characters to use

Exceptions
SAXException:

Doc from org.xml.sax.helpers.DefaultHandler.characters.

Any SAX exception, possibly wrapping another exception.

endDocumentback to summary
public void endDocument() throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endDocument.

Implements org.xml.sax.ContentHandler.endDocument.

Doc from org.xml.sax.helpers.DefaultHandler.endDocument.

Receive notification of the end of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of a document (such as finalising a tree or closing an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
endElementback to summary
public void endElement(String uri, String lName, String qName) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.endElement.

Implements org.xml.sax.ContentHandler.endElement.

Sets the value for the given element if name is one of the array elements in the fields properties, colDef, or data and this XmlReaderContentHandler object's state is not INITIAL. If the state is INITIAL, this method does nothing.

If the state is METADATA and the argument supplied is "metadata", the rowset's metadata is set. If the state is PROPERTIES, the appropriate property is set using the given name to determine the appropriate value. If the state is DATA and the argument supplied is "data", this method sets the state to INITIAL and returns. If the argument supplied is one of the elements in the field data, this method makes the appropriate changes to the rowset's data.

Parameters
lName:String

the name of the element; either (1) one of the array elements in the fields properties, colDef, or data or (2) one of the RowSet elements "properties", "metadata", or "data"

Annotations
@SuppressWarnings:fallthrough
Exceptions
SAXException:
if a general SAX error occurs
errorback to summary
public void error(SAXParseException e) throws SAXParseException

Overrides org.xml.sax.helpers.DefaultHandler.error.

Implements org.xml.sax.ErrorHandler.error.

Throws the given SAXParseException object. This exception was originally thrown by the SAX parser and is passed to the method error when the SAX parser invokes it.

Parameters
e:SAXParseException

the SAXParseException object to throw

getBigDecimalValueback to summary
private BigDecimal getBigDecimalValue(String s)
getBinaryValueback to summary
private byte[] getBinaryValue(String s)
getBooleanValueback to summary
private boolean getBooleanValue(String s)
getByteValueback to summary
private byte getByteValue(String s)
getDateValueback to summary
private Date getDateValue(String s)
getDoubleValueback to summary
private double getDoubleValue(String s)
getEmptyStringValueback to summary
private boolean getEmptyStringValue()
getFloatValueback to summary
private float getFloatValue(String s)
getIntegerValueback to summary
private int getIntegerValue(String s)
getLongValueback to summary
private long getLongValue(String s)
getNullValueback to summary
private boolean getNullValue()
getPresentRowback to summary
private Row getPresentRow(WebRowSetImpl rs) throws SQLException

Returns the current row of this Rowsetobject. The ResultSet's cursor is positioned at the Row which is needed

Returns:Row

the Row object on which the RowSet implementation objects's cursor is positioned

getShortValueback to summary
private short getShortValue(String s)
getStateback to summary
private int getState()

Retrieves the current state of this XmlReaderContentHandler object's rowset, which is stored in the document handler's state field.

Returns:int

one of the following constants: XmlReaderContentHandler.PROPERTIES XmlReaderContentHandler.METADATA XmlReaderContentHandler.DATA XmlReaderContentHandler.INITIAL

getStringValueback to summary
private String getStringValue(String s)
getTagback to summary
private int getTag()
getTimestampValueback to summary
private Timestamp getTimestampValue(String s)
getTimeValueback to summary
private Time getTimeValue(String s)
initMapsback to summary
private void initMaps()

Creates and initializes three new HashMap objects that map the strings returned by the SAX parser to Integer objects. The strings returned by the parser will match the strings that are array elements in this XmlReaderContentHandler object's properties, colDef, or data fields. For each array element in these fields, there is a corresponding constant defined. It is to these constants that the strings are mapped. In the HashMap objects, the string is the key, and the integer is the value.

The purpose of the mapping is to make comparisons faster. Because comparing numbers is more efficient than comparing strings, the strings returned by the parser are mapped to integers, which can then be used in a switch statement.

insertValueback to summary
private void insertValue(String s) throws SQLException
notationDeclback to summary
public void notationDecl(String name, String publicId, String systemId)

Overrides org.xml.sax.helpers.DefaultHandler.notationDecl.

Implements org.xml.sax.DTDHandler.notationDecl.

Doc from org.xml.sax.helpers.DefaultHandler.notationDecl.

Receive notification of a notation declaration.

By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document.

setDataValueback to summary
private void setDataValue(char[] ch, int start, int len) throws SQLException
setEmptyStringValueback to summary
private void setEmptyStringValue(boolean e)
setMetaDataValueback to summary
private void setMetaDataValue(String s) throws SQLException
setNullValueback to summary
private void setNullValue(boolean n)
setPropertyValueback to summary
private void setPropertyValue(String s) throws SQLException
setStateback to summary
private void setState(String s) throws SAXException
setTagback to summary
private void setTag(int t)
startDocumentback to summary
public void startDocument() throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startDocument.

Implements org.xml.sax.ContentHandler.startDocument.

Doc from org.xml.sax.helpers.DefaultHandler.startDocument.

Receive notification of the beginning of the document.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the beginning of a document (such as allocating the root node of a tree or creating an output file).

Exceptions
SAXException:
Any SAX exception, possibly wrapping another exception.
startElementback to summary
public void startElement(String uri, String lName, String qName, Attributes attributes) throws SAXException

Overrides org.xml.sax.helpers.DefaultHandler.startElement.

Implements org.xml.sax.ContentHandler.startElement.

Sets this XmlReaderContentHandler object's tag field if the given name is the key for a tag and this object's state is not INITIAL. The field is set to the constant that corresponds to the given element name. If the state is INITIAL, the state is set to the given name, which will be one of the sections PROPERTIES, METADATA, or DATA. In either case, this method puts this document handler in the proper state for calling the method endElement.

If the state is DATA and the tag is RowTag, DelTag, or InsTag, this method moves the rowset's cursor to the insert row and sets this XmlReaderContentHandler object's idx field to 0 so that it will be in the proper state when the parser calls the method endElement.

Parameters
lName:String

the name of the element; either (1) one of the array elements in the fields properties, colDef, or data or (2) one of the RowSet elements "properties", "metadata", or "data"

attributes:Attributes

org.xml.sax.AttributeList objects that are attributes of the named section element; may be null if there are no attributes, which is the case for WebRowSet objects

Exceptions
SAXException:
if a general SAX error occurs
unparsedEntityDeclback to summary
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName)

Overrides org.xml.sax.helpers.DefaultHandler.unparsedEntityDecl.

Implements org.xml.sax.DTDHandler.unparsedEntityDecl.

Doc from org.xml.sax.helpers.DefaultHandler.unparsedEntityDecl.

Receive notification of an unparsed entity declaration.

By default, do nothing. Application writers may override this method in a subclass to keep track of the unparsed entities declared in a document.

warningback to summary
public void warning(SAXParseException err) throws SAXParseException

Overrides org.xml.sax.helpers.DefaultHandler.warning.

Implements org.xml.sax.ErrorHandler.warning.

Prints a warning message to System.out giving the line number and uri for what caused the warning plus a message explaining the reason for the warning. This method is invoked by the SAX parser.

Parameters
err:SAXParseException

a warning generated by the SAX parser