• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Castor XML Marshalling Question

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Community,

I have q quick question regarding Java Castor and XML Marshalling ... I have been trying for quite some to create a castor mapping file that will allow for the following XML to be prodiced:



The problem is with regards to the repeating parameter elements, and the encapsulation within the criteria element.
Can anyone help?
Thanks in advance
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the big picture.

[1] You've some class say Request in some domain which may look like this.

[2] Then you've the class X in some domain, say the same, which looks like this.

[3] In you mapping file, the critical input is to have an attribute container (boolean) set to false (default true) like this.

Pay specific attention to the attribute needed container="false" in the field with collection attribute. You take care of the namespace too yourself as there is no useful info in your post and I suppose you can handle that part.

edit: Upon re-read what I posted, I edited the param bind-xml to fall inline with what I had in mind. node="text" and no need the name attribute.
 
Marco Di Baggio
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just wanted to extend a thank-you to "g tsuji" ... this post is solved based on the recent reply /post.

Marking this post as closed.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic