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


Win a copy of Spring in Action this week in the Spring forum!
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: 42286
    
  64
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to pass a java.util.HashMap in an XML