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 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 Soft Skills this week in the Jobs Discussion 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: 42912
    
  68
XML Schema doesn't support Java Collections classes, so you'd need to roll your own.
Thomas Chang
Ranch Hand

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

Joined: Mar 22, 2005
Posts: 42912
    
  68
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