aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 39547
    
  27
XML Schema doesn't support Java Collections classes, so you'd need to roll your own.


Ping & DNS - updated with new look and Ping home screen widget
Thomas Chang
Ranch Hand

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

Joined: Mar 22, 2005
Posts: 39547
    
  27
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A question about XML/Java Type Mappings
 
Similar Threads
Site navigation using xml
Doubt on error-page
read in a xml file
Java Script vs AJAX
How best to deal with Interface Return Type for Web Service Method