This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 41057
    
  43
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
 
Similar Threads
How to do XML to DB using Message Driven Bean?
response xml
Meaning of XML
String
add, edit xml record using jsp