com.billpringle.utils
Class WrpXmlMap.XmlMapContentHandler

java.lang.Object
  extended by com.billpringle.utils.WrpXmlMap.XmlMapContentHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler
Enclosing class:
WrpXmlMap

public class WrpXmlMap.XmlMapContentHandler
extends java.lang.Object
implements org.xml.sax.ContentHandler

XML Event Handler for WrpXmlMap class This class responds as the various XML elements are being read. The very first element (the root element) is ignored, but the remainder of the file should be of the form:

 <name>value</name>
 
Where name is the name (or key) and value is the value associated with the key.

When the start tag is encountered, the name is saved. When the value string is read, that value is added to the vector associated with the saved key string.

Each key will have a Vector of String values. There can be multiple entries with the same key.

Author:
Bill Pringle

Constructor Summary
WrpXmlMap.XmlMapContentHandler()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(java.lang.String url, java.lang.String localName, java.lang.String qualName)
           
 void endPrefixMapping(java.lang.String arg0)
           
 void ignorableWhitespace(char[] arg0, int arg1, int arg2)
           
 void processingInstruction(java.lang.String arg0, java.lang.String arg1)
           
 void setDocumentLocator(org.xml.sax.Locator arg0)
           
 void skippedEntity(java.lang.String arg0)
           
 void startDocument()
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qualName, org.xml.sax.Attributes attribs)
           
 void startPrefixMapping(java.lang.String arg0, java.lang.String arg1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WrpXmlMap.XmlMapContentHandler

public WrpXmlMap.XmlMapContentHandler()
Method Detail

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

endDocument

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

endElement

public void endElement(java.lang.String url,
                       java.lang.String localName,
                       java.lang.String qualName)
                throws org.xml.sax.SAXException
Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String arg0)
                      throws org.xml.sax.SAXException
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] arg0,
                                int arg1,
                                int arg2)
                         throws org.xml.sax.SAXException
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

processingInstruction

public void processingInstruction(java.lang.String arg0,
                                  java.lang.String arg1)
                           throws org.xml.sax.SAXException
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator arg0)
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

skippedEntity

public void skippedEntity(java.lang.String arg0)
                   throws org.xml.sax.SAXException
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qualName,
                         org.xml.sax.Attributes attribs)
                  throws org.xml.sax.SAXException
Specified by:
startElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException

startPrefixMapping

public void startPrefixMapping(java.lang.String arg0,
                               java.lang.String arg1)
                        throws org.xml.sax.SAXException
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException