This should be posted in a forum for Java. Creating XML from Java is a pretty basic process. Google will be able to provide you with wealth of examples.
quick example:
[code=java]
// Assuming hashtable is in variable hash
String result = "<hashtable >";
for (Enumeration e = hash.keys() ; e.hasMoreElemen ts() ;) {
Object key = e.nextElement;
result += "<pair>";
result += "<key>"+key +"</key>";
result += "<value>"+hash. get(key)+"</value>";
result += "</pair>";
}
result += "</hashtable>
quick example:
[code=java]
// Assuming hashtable is in variable hash
String result = "<hashtable >";
for (Enumeration e = hash.keys() ; e.hasMoreElemen ts() ;) {
Object key = e.nextElement;
result += "<pair>";
result += "<key>"+key +"</key>";
result += "<value>"+hash. get(key)+"</value>";
result += "</pair>";
}
result += "</hashtable>
[/code]
Hmmmm.... This brings up another good question. What Java object type are you wanting to transfer the Hashtable data to. This code will produce a string object. Will that work, or will you need it in a XML element or node object?
Comment