|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.syncclient.common.XMLHashMapParser
public class XMLHashMapParser
It supplies the methods for the marshall and unmarshall of a HashMap in xml.
The xml begins with <RECORD> and ends with </RECORD>
Every object of the table comes represented with formed following
<FIELD>
<NAME>name of the field</NAME>
<VALUE>value of the field</VALUE>
</FIELD>
Example of HashMap represented in xml:
<RECORD>
<FIELD>
<NAME>name</NAME>
<VALUE>john</VALUE>
</FIELD>
<FIELD>
<NAME>birthDate</NAME>
<VALUE>100128313321</VALUE>
</FIELD>
</RECORD>
The null values are represent by NULL_VALUE
Constructor Summary | |
---|---|
XMLHashMapParser()
|
Method Summary | |
---|---|
static java.util.Map |
toMap(java.lang.String xml)
Converts a xml in HashMap |
static java.lang.String |
toXML(java.util.Map values)
Converts a HashMap in xml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLHashMapParser()
Method Detail |
---|
public static java.lang.String toXML(java.util.Map values)
values
- the HasMap to convert
public static java.util.Map toMap(java.lang.String xml) throws java.lang.IllegalStateException
xml
- the xml to convert
java.lang.IllegalStateException
- if an error occurs during the conversion
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |