Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Java Castor XML Marshalling Question

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • 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: 729
7
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic