Re: How to add standalone attribute
"pgillen" <[email protected]> Thu, 12 May 2011 12:12:40 +0000
| Newsgroups | gmane.text.xml.xmlbeans.user |
|---|---|
| Message-ID | <1091072418-1305202363-cardhu_decombobulator_blackberry.rim.net-1658762960-@bda945.bisx.prod.on.blackberry> |
I tried that without effect. Be interested to hear others experience. -paul- --------- Paul Gillen -----Original Message----- From: Jacob Danner <[email protected]> Date: Wed, 11 May 2011 18:24:34 To: <[email protected]> Reply-To: [email protected] Subject: Re: How to add standalone attribute Take a look at XmlDocumentProperties.setstandalone(...) -jacobd On May 10, 2011 11:47 AM, "Roman Kashitsyn" <[email protected]> wrote: > > How can I add standalone="yes" attribute to "xml" processing instruction when > saving xmlbean? Suppose I had an xmlbean and I want to save it in the > following way: > > > XmlOptions xmlOptions = new XmlOptions(); > xmlOptions.setSaveOuter(); > xmlOptions.setSaveSyntheticDocumentElement(new QName(NAMESPACE_URI, > TAG_NAME, PREFIX)); > > /* some magic happens here */ > > bean.save(anOutputStream, xmlOptions) > > > Now I get the following result: > > <?xml version="1.0" encoding="utf-8"?> > <!-- perfectly well xml file --> > > > How can I get the following result: > > <?xml version="1.0" encoding="utf-8" standalone="yes"?> > <!-- perfectly well xml file --> > > ??? > -- > View this message in context: http://old.nabble.com/How-to-add-standalone-attribute-tp31586761p31586761.html > Sent from the Xml Beans - User mailing list archive at Nabble.com.