You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Dário Abdulrehman <da...@gmail.com> on 2008/02/21 16:07:33 UTC
saving and getting back XMLBeans
Hi,
I'd like to save a XMLBean with the declaration and encoding and read it
back (using parse?).
The method xmlText just saves a xmlfragment with no declaration so later
when I try to read it back with parse it fails.
Is there any code example for this?
thx,
Dário
--
Dário Abdulrehman
PGP Public Key: http://tinyurl.com/2pm9d7
--
Re: saving and getting back XMLBeans
Posted by Dário Abdulrehman <da...@gmail.com>.
Problem solved, thanks.
I noticed that when using save with a StringWriter the XML declaration is
not written whereas if I use a File it is.
On Thu, Feb 21, 2008 at 3:33 PM, Jacob Danner <ja...@gmail.com>
wrote:
> Try the save(file) method on the xmlobject.
> -jacobd
>
> On Thu, Feb 21, 2008 at 7:07 AM, Dário Abdulrehman
> <da...@gmail.com> wrote:
> > Hi,
> >
> > I'd like to save a XMLBean with the declaration and encoding and read it
> > back (using parse?).
> >
> > The method xmlText just saves a xmlfragment with no declaration so later
> > when I try to read it back with parse it fails.
> >
> > Is there any code example for this?
> >
> > thx,
> > Dário
> >
> > --
> > Dário Abdulrehman
> > PGP Public Key: http://tinyurl.com/2pm9d7
> > --
>
>
>
> --
> I'm competing in a Half-Ironman distance triathlon to raise money for
> the fight against cancer!
> Please help support my efforts by going to:
> http://www.active.com/donate/tntwaak/jacobd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>
--
Dário Abdulrehman
PGP Public Key: http://tinyurl.com/2pm9d7
--
Re: saving and getting back XMLBeans
Posted by Jacob Danner <ja...@gmail.com>.
Try the save(file) method on the xmlobject.
-jacobd
On Thu, Feb 21, 2008 at 7:07 AM, Dário Abdulrehman
<da...@gmail.com> wrote:
> Hi,
>
> I'd like to save a XMLBean with the declaration and encoding and read it
> back (using parse?).
>
> The method xmlText just saves a xmlfragment with no declaration so later
> when I try to read it back with parse it fails.
>
> Is there any code example for this?
>
> thx,
> Dário
>
> --
> Dário Abdulrehman
> PGP Public Key: http://tinyurl.com/2pm9d7
> --
--
I'm competing in a Half-Ironman distance triathlon to raise money for
the fight against cancer!
Please help support my efforts by going to:
http://www.active.com/donate/tntwaak/jacobd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org