This is unfortunately a shortcoming in XmlBeans - when "fragments" are saved (XmlObjects that are not Documents), the type of the fragment is not saved, so when loading the XML back, you need to either use:
CorrectType.Factory.parse(fragment); or anyTypeXmlObject.changeType(CorrectType.type) after getting the generic XmlObject. Hope this helps, Radu On Mon, 2007-12-03 at 14:04 +0100, Jan Torben Heuer 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] > 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]

