Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Great article, and the next step is...



Back to:
www.javaworld.com/javaworld/jw-02-2008/jw-02-springcomponents.html
.

I wanted to say what a truly helpful article this is, since I haven't been able to find ANY other information anywhere on how to do this. I was trying to piece it together myself, but that was pretty slow sledding.

But (as is usual with these sort of posts :) there's a next step that I'm having trouble with. How do you handle child nodes? I thought this would be relatively easy and just sort of take care of itself, but it hasn't worked out that way.

So I have a node element defined in my XSD. One of the child elements is named children, which is a sequence of the same node type. This looks pretty straightforward when you configure it:

Where exactly would you handle those children? And how would you set them with the setChildren() method on the parent object? I'm not averse to wrapping the children in a element or something similar (or even a block, although that's kinda clunky).

I've been beating my head against the wall trying to figure this out for two days now! Any help would be greatly appreciated!

Your rating: None