|
Hi Vlad I’m a little confused over exactly
what you’re trying to do. Substitution groups define elements which can
replace other elements – therefore I’m not sure what AttributeValue
does in your example below and nor is it mentioned in the bits of schema you
have. Nonetheless the way you do substitution in
XmlBeans is to use the substitute() method (which is available on every
generated XmlBean) e.g. suppose you have an outerObject with a child element
called “substitutingThis”. You would then add a new “substitutingThis”
using addNewSubstitutingThis() as usual: SubstitutingThis substitutingThis =
outerObject.addNewSubstitutingThis(); Once you have a reference to the thing you
want to substitute then you would substitute it as follows: QName qName = new QName( "namespace_of_element_you_are_using_as_substitution",
" local_name_of_element_you_are_using_as_substitution "); SubstType resultObject = (SubstType)
substitutingThis.substitute(qName, SubstType.type); where SubstType is whatever type the element
you are substituting with has. Then resultObject will have type SubstType
and you can then use the setXXX() methods on it exactly as you do normal child
elements. Hope that helps. Cheers, From: Vlad Mangeym
[mailto:[EMAIL PROTECTED] I have the following types: Relax. Yahoo! Mail virus
scanning helps detect nasty viruses! |
- Need help with substitutionGroup Vlad Mangeym
- RE: Need help with substitutionGroup Lawrence Jones
- RE: Need help with substitutionGroup Vlad Mangeym
- RE: Need help with substitutionGroup Lawrence Jones
- RE: Need help with substitutionGroup Lawrence Jones
- RE: Need help with substitutionGroup Vlad Mangeym
- RE: Need help with substitutionGroup Lawrence Jones

