I haven't had troubles with this. Are you currently having difficulties? How are you saving the file? Are you using XmlObject.save(...) or writing String s out to a file?
The only gotcha you may run into is if you are using a type, it may be wrapped in <xml-fragment />. There are some XmlOptions for handling that. Your note, doc = XmlObject.Factory.parse(s); However, doc is of type XmlAnyTypeImpl, now. This is to be expected. If you want a different schema type, you will need to do something like SomeType.Factory.parse(..) and now doc will be of someType or doc.changeType(<your Types QName) (?-not positive of the method name and no api at the moment) Hope this helps, -jacobd On Dec 3, 2007 5:04 AM, Jan Torben Heuer <[EMAIL PROTECTED]> wrote: > Hi, > > can I save a xmlobject and parse it back, later? > The XmlObject is not a Document! > > I tried: > > String s = obj.xmltext(); > > ... > > doc = XmlObject.Factory.parse(s); > > However, doc is of type XmlAnyTypeImpl, now. > > Is there another way of serializing and restoring xmlbeans objects? > > > Jan > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >