« Return to Thread: How to add standalone attribute

Re: How to add standalone attribute

by Paul Gillen :: Rate this Message:

| View in Thread

I tried that without effect. Be interested to hear others experience. -paul-

---------
Paul Gillen


From: Jacob Danner <jacob.danner@...>
Date: Wed, 11 May 2011 18:24:34 -0700
To: <user@...>
ReplyTo: user@...
Subject: Re: How to add standalone attribute

Take a look at XmlDocumentProperties.setstandalone(...)
-jacobd

On May 10, 2011 11:47 AM, "Roman Kashitsyn" <romankashicin@...> 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:
>
> &lt;?xml version="1.0" encoding="utf-8"?&gt;
> &lt;!-- perfectly well xml file --&gt;
>
>
> How can I get the following result:
>
> &lt;?xml version="1.0" encoding="utf-8" standalone="yes"?&gt;
> &lt;!-- perfectly well xml file --&gt;
>
> ???
> --
> 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.

 « Return to Thread: How to add standalone attribute