|Kent Spaulding||Jul 26, 2005 11:47 am|
|Don Stewart||Jul 27, 2005 1:58 am|
|Caroline Wood||Jul 27, 2005 2:01 am|
|Kent Spaulding||Jul 27, 2005 8:05 am|
|Cezar Andrei||Jul 27, 2005 9:55 am|
|Dave Harrison||Jul 27, 2005 10:09 am|
|steph||Jul 27, 2005 10:41 am|
|Dave Harrison||Jul 27, 2005 11:09 am|
|Kent Spaulding||Jul 27, 2005 11:28 am|
|Stephane Morucci||Jul 27, 2005 11:29 am|
|Kent Spaulding||Jul 27, 2005 11:44 am|
|Cezar Andrei||Jul 27, 2005 2:10 pm|
|Dave Harrison||Jul 27, 2005 2:44 pm|
|Kent Spaulding||Jul 27, 2005 3:31 pm|
|Dave Harrison||Jul 28, 2005 5:43 am|
|Kent Spaulding||Jul 28, 2005 9:56 am|
|Subject:||RE: Creating complexType objects...|
|From:||Caroline Wood (Caro...@cpp.co.uk)|
|Date:||Jul 27, 2005 2:01:27 am|
I think what you need to do is:
FooDocument fooDocument = FooDocument.Factory.newInstance(); FooDocument.Foo foo = FooDocument.Foo.Factory.newInstance();
foo.setName("blah blah"); fooDocument.setFoo(foo); print(fooDocument);
Give at a go and let us know what happens!
In the first example replace print(foo); with print(foo.xmlText());
I've looked over all the doc, and archives, and haven't found if there's an easier to do what I'd like in XmlBeans 2.0.0.
It looks like to create an XmlObject that has a name other than "xml-fragment" in the first element, you need to go through an object type that contains that type.
i.e. If I have Foo defined as a type with just a name attribute:
Foo foo = Foo.Factory.newInstance(); foo.setName("name"); print(foo);
If I want <foo name="name"/> as the xml - I need to find a type (let's call it Bar) that encloses the Foo type and do:
Bar bar = Bar.Factory.newInstance(); Foo foo = bar.addNewFoo(); foo.setName("name"); foo.set(bar);
now foo is:
Is this really what's required?
If this made no sense; I can send a more concrete example.
Thanks for the help, --Kent
This is an email from the CPP Group Plc, Holgate Park, York, YO26 4GA; telephone
01904 544500. This message may contain information that is confidential. If you are not the
intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you
have received this message in error, please notify the sender immediately by email, facsimile or
telephone and either return or destroy the original message. The CPP Group Plc accepts no responsibility for any changes made to this message
after it has been sent by the original author. This email has been scanned for all viruses by the
MessageLabs Email Security System.