File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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: 41188
    
  45
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