RE: xmlbeans beginner - help

2007-11-06 Thread Vinh Nguyen (vinguye2)
Imorales, I think what you want is to automatically convert a POJO into an XML string, right? That way, you can convert the XML string into an XmlObject? Not sure why you need to do that if you can already work with the POJO directly. Other than that, as Paul pointed out, you can use XStream to

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

RE: xmlbeans beginner - help

2007-11-06 Thread Wing Yew Poon
imorales, I think you're looking for something that XMLBeans is not designed for. It sounds like you want to start with a POJO class and somehow automagically get something like an XmlObject out of it. There is no mechanism to do that. What Cezar wrote about is the capability of XMLBeans to parse x

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 11/6/200

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 si

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
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 handl

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 XmlObje

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

RE: xmlbeans beginner - help

2007-11-06 Thread Schalk Neethling
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 strin

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(){}