aspose file tools*
The moose likes XML and Related Technologies and the fly likes How to pass a java.util.HashMap in an XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to pass a java.util.HashMap in an XML " Watch "How to pass a java.util.HashMap in an XML " New topic
Author

How to pass a java.util.HashMap in an XML

Merrin Thomas
Greenhorn

Joined: Jun 01, 2006
Posts: 1
Can anybody tell how a Hash map can be reperesented in a XML file and read it.
Expecting a reply,

Merrin.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41829
    
  63
Welcome to JavaRanch.

You would need to represent a list of key/value pairs, which is easy if the keys and values are simple types. If they are complex types, things get trickier. If nothing suggests itself to you, you could use a java.beans.XMLEncoder, and see what kind of XML that generates from your data.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass a java.util.HashMap in an XML