This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes A question about XML/Java Type Mappings Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "A question about XML/Java Type Mappings" Watch "A question about XML/Java Type Mappings" New topic
Author

A question about XML/Java Type Mappings

Thomas Chang
Ranch Hand

Joined: May 13, 2008
Posts: 61
Hi all,

Is there any xml-type which can be mapped to Map or something something similar in Java? Such as:

xs:xxx -> HashMap
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
XML Schema doesn't support Java Collections classes, so you'd need to roll your own.


Ping & DNS - my free Android networking tools app
Thomas Chang
Ranch Hand

Joined: May 13, 2008
Posts: 61
For example?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
That depends on which library you use for the mapping. You mentioned XML Schema, and that doesn't support Collections. Any given XML/Java binding library may very well support Collections, just not using XML Schema.
 
Don't get me started about those stupid light bulbs.
 
subject: A question about XML/Java Type Mappings
 
Similar Threads
How best to deal with Interface Return Type for Web Service Method
Doubt on error-page
Java Script vs AJAX
read in a xml file
Site navigation using xml