You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Jacob Danner <ja...@gmail.com> on 2007/12/01 08:01:24 UTC

Re: XML generation

As far as I remember, xmlText was best suited for system.out display.
If you want to save the file with the xml pi, try the XmlObject.save()
method.
Hope this helps,
-jacobd

On 11/28/07, baisa, darwin <da...@ips.invensys.com> wrote:
> Hi,
>
> I am generating XML text using my XMLBeans document object.
> Document.xmlText this is generating the XML text perfectly. But it is
> not adding that line "<?xml version="1.0" encoding="utf-8"?>", is there
> any option to set in XmlOptions ? Or do we need to add it manually?
> Please help...
>
> Regards,
> Darwin Baisa
>
>
>
> * Confidentiality Notice:
> This e-mail and any associated files are intended solely for the individual
> or entity to whom they are addressed. Please do not copy it or use it for
> any purposes, or disclose its contents to any other person. Further, this
> e-mail and any associated files may be confidential and further may be
> legally privileged. This email is from the Invensys Process Systems business
> unit of Invensys plc which is a company registered in England and Wales with
> its registered office at Portland House, Bressenden Place, London, SW1E 5BF
> (Registered number 166023).  For a list of European legal entities within
> the Invensys Process Systems business group, please click here
> http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77.
>
> If you have received this e-mail in error, you are on notice of its status.
> Please notify us immediately by reply e-mail and then delete this message
> from your system. Thank you for your co-operation. You may contact our
> Helpdesk on +44 (0)20 7821 3859 / 2105 or email
> inet.hqhelpdesk@invensys.com. This e-mail and any attachments thereto may be
> subject to the terms of any agreements between Invensys (and/or its
> subsidiaries and affiliates) and the recipient (and/or its subsidiaries and
> affiliates).
>
>

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


RE: XML generation

Posted by Wing Yew Poon <wp...@bea.com>.
The reason XmlTokenSource.xmlText() does not include the xml header
is because it returns a string rather than writing to an OutputStream
as save(OutputStream) does, for example, so the encoding is not known.
When you call save(OutputStream) or similar methods, then the xml
header will be written with the appropriate encoding declared.
- Wing Yew

-----Original Message-----
From: Jacob Danner [mailto:jacob.danner@gmail.com] 
Sent: Friday, November 30, 2007 11:01 PM
To: user@xmlbeans.apache.org
Subject: Re: XML generation

As far as I remember, xmlText was best suited for system.out display.
If you want to save the file with the xml pi, try the XmlObject.save()
method.
Hope this helps,
-jacobd

On 11/28/07, baisa, darwin <da...@ips.invensys.com> wrote:
> Hi,
>
> I am generating XML text using my XMLBeans document object.
> Document.xmlText this is generating the XML text perfectly. But it is
> not adding that line "<?xml version="1.0" encoding="utf-8"?>", is
there
> any option to set in XmlOptions ? Or do we need to add it manually?
> Please help...
>
> Regards,
> Darwin Baisa
>
>
>
> * Confidentiality Notice:
> This e-mail and any associated files are intended solely for the
individual
> or entity to whom they are addressed. Please do not copy it or use it
for
> any purposes, or disclose its contents to any other person. Further,
this
> e-mail and any associated files may be confidential and further may be
> legally privileged. This email is from the Invensys Process Systems
business
> unit of Invensys plc which is a company registered in England and
Wales with
> its registered office at Portland House, Bressenden Place, London,
SW1E 5BF
> (Registered number 166023).  For a list of European legal entities
within
> the Invensys Process Systems business group, please click here
>
http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_i
d=77.
>
> If you have received this e-mail in error, you are on notice of its
status.
> Please notify us immediately by reply e-mail and then delete this
message
> from your system. Thank you for your co-operation. You may contact our
> Helpdesk on +44 (0)20 7821 3859 / 2105 or email
> inet.hqhelpdesk@invensys.com. This e-mail and any attachments thereto
may be
> subject to the terms of any agreements between Invensys (and/or its
> subsidiaries and affiliates) and the recipient (and/or its
subsidiaries and
> affiliates).
>
>

---------------------------------------------------------------------
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