• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A question about XML/Java Type Mappings

 
Thomas Chang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML Schema doesn't support Java Collections classes, so you'd need to roll your own.
 
Thomas Chang
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For example?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic