org.onemind.commons.java.datastructure
Class XmlPropertyElementDigester
java.lang.Object
org.onemind.commons.java.xml.digest.DefaultDigester
org.onemind.commons.java.datastructure.XmlPropertyElementDigester
- All Implemented Interfaces:
- ElementDigester
public class XmlPropertyElementDigester
- extends DefaultDigester
- implements ElementDigester
A Sax elemenbt handler that can handle parsing properties specified in an xml file
This syntax of the xml is something like
- Author:
- TiongHiang Lee (thlee@onemindsoft.org)
|
Field Summary |
private java.util.Map |
_prop
|
private static java.util.Map |
_typeMap
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_typeMap
private static final java.util.Map _typeMap
_prop
private final java.util.Map _prop
XmlPropertyElementDigester
public XmlPropertyElementDigester(java.lang.String elementName,
java.util.Map prop)
startDigest
public void startDigest(SaxDigesterHandler handler,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
- Start an element with the given attributes
- Specified by:
startDigest in interface ElementDigester- Overrides:
startDigest in class DefaultDigester
- Parameters:
handler - the handlerattrs - the attributes
- Throws:
org.xml.sax.SAXException - if there's handling exception
endDigest
public void endDigest(SaxDigesterHandler handler)
throws org.xml.sax.SAXException
- End the element
- Specified by:
endDigest in interface ElementDigester- Overrides:
endDigest in class DefaultDigester
- Parameters:
handler - the handler
- Throws:
org.xml.sax.SAXException - if there's handling exception
characters
public void characters(SaxDigesterHandler handler,
char[] chars,
int offset,
int length)
throws org.xml.sax.SAXException
- Handle the characters
- Specified by:
characters in interface ElementDigester- Overrides:
characters in class DefaultDigester
- Parameters:
handler - the handlerchars - the charactersoffset - the offsetlength - the length
- Throws:
org.xml.sax.SAXException - if there's parse problem