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]

Reply via email to