xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Vasilik" <e...@vasilik.com>
Subject Re: Missing the XML header
Date Thu, 14 Dec 2006 20:48:19 GMT
The reason for this is that when saving out chars, the encoding has
not been established, while when saving out bytes, it has.

- Eric

On 12/14/06, Cezar Andrei <cezar@bea.com> wrote:
> The xml declaration is not used when saving to a text or Writer, but it
> will be used when saving into an OutputStream.
>
> Cezar
>
> > -----Original Message-----
> > From: kris16 [mailto:krister.o.jonsson@tietoenator.com]
> > Sent: Thursday, December 14, 2006 7:07 AM
> > To: user@xmlbeans.apache.org
> > Subject: Missing the XML header
> >
> >
> > Hi,
> > when i print out my XMK document  the xml header is not shown (<?xml
> > version="1.0" encoding="UTF-8"?>).
> > I use the command :
> >
> > String xmlStr = newListItem.xmlText(opts);
> > System.out.println(xmlStr);
> > The result:
> >
> > <ListItemMaster releaseID="test" languageCode="sv"
> > xmlns="http://www.openapplications.org/oagis/9">
> >   <ApplicationArea>
> >     <CreationDateTime>2006-12-14+01:00</CreationDateTime>
> >   </ApplicationArea>
> >   <DataArea>
> >     <List/>
> >     <ItemMaster/>
> >   </DataArea>
> > </ListItemMaster>
> >
> >
> > It prints the whole document but not the first line, <?xml
> version="1.0"
> > encoding="UTF-8"?>
> > Any hints ?
> >
> > /Regards Krister
> >
> > --
> > View this message in context: http://www.nabble.com/Missing-the-XML-
> > header-tf2820453.html#a7872077
> > Sent from the Xml Beans - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: user-help@xmlbeans.apache.org
>
> _______________________________________________________________________
> 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: user-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: user-help@xmlbeans.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org


Mime
View raw message