xmlbeans beginner - help

2007-11-06 Thread imorales
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(){}

RE: xmlbeans beginner - help

2007-11-06 Thread imorales
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

RE: xmlbeans beginner - help

2007-11-06 Thread Cezar Andrei
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

RE: xmlbeans beginner - help

2007-11-06 Thread imorales
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

RE: xmlbeans beginner - help

2007-11-06 Thread Albert Bupp
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

RE: xmlbeans beginner - help

2007-11-06 Thread imorales
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

RE: xmlbeans beginner - help

2007-11-06 Thread Albert Bupp
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

RE: xmlbeans beginner - help

2007-11-06 Thread Paul French
XStream does exactly what you want. Paul -Original Message- From: Wing Yew Poon [mailto:[EMAIL PROTECTED] Sent: 06 November 2007 19:34 To: user@xmlbeans.apache.org Subject: RE: xmlbeans beginner - help imorales, I think you're looking for something that XMLBeans is not designed for. It