Check out the XmlObject.Factory class in the java
docs. I've never used it, but it appears to have
several methods which return either XmlObject or
DomImplementation instances. It seems that you
then have to create an XMLInputStream instance to feed in your XML.
-Albert
At 10:40 AM 11/6/2007, you wrote:
Yes I know but, can I convert a simple java class A to a XmlObject without
schema ?
Albert Bupp wrote:
>
> He means the XmlObject class which you'll find in the XmlBeans library.
>
> -Albert
>
> At 10:27 AM 11/6/2007, you wrote:
>
>>That sounds good but, I donôt have a XmlObject, I have a simple pojo
(class
>>A) and i want to convert it to XmlObject, my class A have to implements
>>XmlObject ? How can I do this ??
>>
>>Cezar Andrei wrote:
>> >
>> > It is possible, but a little less forward that using schema. Just use
>> > XmlObject, it handles all un-typed XML in XMLBeans.
>> >
>> > Use XmlObject xo = XmlObject.Factory.parse(xmlText) to load the xml
>> into
>> > XmlObject.
>> > And String xmlText = xo.xmlText() to get back to xml.
>> >
>> > To navigate/read/modify the XmlObject without a schema, you have to use
>> > either the cursor xo.newCursor() or the DOM xo.newDomNode().
>> >
>> > Cezar
>> >
>> >> -----Original Message-----
>> >> From: imorales [mailto:[EMAIL PROTECTED]
>> >> Sent: Tuesday, November 06, 2007 8:50 AM
>> >> To: user@xmlbeans.apache.org
>> >> Subject: RE: xmlbeans beginner - help
>> >>
>> >>
>> >> Is there any way to get from Java classes without XML schema and vice
>> >> versa?
>> >>
>> >> Thanks.
>> >>
>> >> Schalk Neethling-4 wrote:
>> >> >
>> >> > You will more then likely have to start with a schema. So define
>> your
>> >> > schema and the from this generate your XMLBean which will give you
>> >> object
>> >> > A, you can then populate object A using the set methods that will be
>> >> > generated and once you have the completed object you can invert it
>> into
>> >> a
>> >> > XML string with one step by calling A.xmlText();
>> >> >
>> >> > HTH!
>> >> >
>> >> > Regards,
>> >> > Schalk Neethling
>> >> >
>> >> > -----Original Message-----
>> >> > From: imorales [mailto:[EMAIL PROTECTED]
>> >> > Sent: 06 November 2007 11:29 AM
>> >> > To: user@xmlbeans.apache.org
>> >> > Subject: xmlbeans beginner - help
>> >> >
>> >> >
>> >> > Hi is my first time using xmlbeans and I hava a couple of question,
>> I
>> >> > explain
>> >> > my scenario and I would like someone to resolve my ignorance about
>> >> > xmlbeans.
>> >> >
>> >> > Well I hava a pojo class:
>> >> >
>> >> > ------------------------------------------
>> >> > public class A{
>> >> > private String b;
>> >> >
>> >> > public A(){}
>> >> >
>> >> > public String getB(){ return b;}
>> >> > public void setB(String b){this.b = b;}
>> >> > }
>> >> > ------------------------------------------
>> >> >
>> >> > Iôm using a web service that takes one parameter (String), this
>> >> parameter
>> >> > is
>> >> > the XML associated to the class A. My question is how I can using
>> >> xmlbeans
>> >> > conver one object A to a XML and then to String. I have no schema to
>> do
>> >> > this
>> >> > and I donôt know if is necessary.
>> >> >
>> >> > Thanks in advance.
>> >> >
>> >> > --
>> >> > View this message in context:
>> >> >
>> http://www.nabble.com/xmlbeans-beginner---help-tf4756991.html#a13603299
>> >> > Sent from the Xml Beans - User mailing list archive at Nabble.com.
>> >> >
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> > This email and all content are subject to the following disclaimer:
>> >> >
>> >> > http://content.momentum.co.za/content/legal/disclaimer_email.htm
>> >> >
>> >> >
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> http://www.nabble.com/xmlbeans-beginner---
>> >> help-tf4756991.html#a13608035
>> >> Sent from the Xml Beans - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> > Notice: This email message, together with any attachments, may contain
>> > information of BEA Systems, Inc., its subsidiaries and affiliated
>> > entities, that may be confidential, proprietary, copyrighted and/or
>> > legally privileged, and is intended solely for the use of the
>> individual
>> > or entity named in this message. If you are not the intended recipient,
>> > and have received this message in error, please immediately return this
>> by
>> > email and then delete it.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>>--
>>View this message in context:
>>http://www.nabble.com/xmlbeans-beginner---help-tf4756991.html#a13608875
>>Sent from the Xml Beans - User mailing list archive at Nabble.com.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/xmlbeans-beginner---help-tf4756991.html#a13609293
Sent from the Xml Beans - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]