<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4923.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=280084520-22092003>The
other choice is to "link" to it. This is the approach taken by HTML
"containing" binary images.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=280084520-22092003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=280084520-22092003>XML is
Unicode (8-bit ascii is handled internally as 16-bit unicode) and nothing
else. Binary data can look like absolutely anything, including XML
tags. So for many good reasons, XML cannot contain binary
data.</SPAN></FONT></DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Joseph Yin
[mailto:jyin@qualcomm.com]<BR><B>Sent:</B> Monday, September 22, 2003 3:13
PM<BR><B>To:</B> jdom-interest@jdom.org; New, Cecil (GEAE)<BR><B>Subject:</B>
RE: [jdom-interest] Adding content to CDATA<BR><BR></FONT></DIV>Hi
there:<BR><BR>Is there a way to get the content in Binary only without the
Base64 encoder.<BR><BR>Thanks, Joseph<BR>At 02:02 PM 9/22/2003 -0400, New,
Cecil (GEAE) wrote:<BR>
<BLOCKQUOTE class=cite cite type="cite"><FONT face=arial color=#0000ff
size=2>Use a Base64 encoder. This makes the binary data ascii text
(also increases the size of the data).</FONT><BR>
<DL>
<DD><FONT face=tahoma size=2>-----Original Message-----<BR>
<DD>From:</B> Joseph Yin [<A href="mailto:jyin@qualcomm.com"
eudora="autourl">mailto:jyin@qualcomm.com</A>]<BR>
<DD>Sent:</B> Monday, September 22, 2003 1:08 PM<BR>
<DD>To:</B> jdom-interest@jdom.org<BR>
<DD>Subject:</B> [jdom-interest] Adding content to CDATA<BR>
<DD>Importance:</B> High<BR><BR></FONT>
<DD>Hi there:<BR><BR>
<DD>I am new using JDOM to create my XML file, but I have a question
regarding how to add binary content into CDATA. I have a java method
to read in a file (e.g. PDF), and the method returns the content of
the file in ByteArrayOutputStream data type. I want to pass the
content into the CDATA section as is, and so far I found JDOM's CDATA
requires a String data type. Can anyone provide me with some hints
on how to set the CDATA content with Binary input???<BR><BR>
<DD>Thanks for your assistance.<BR><BR>
<DD>Best, Joseph Yin<BR><BR>
<DD>=====================================================================
<BR>
<DD>Joseph C. Yin</I></B>, MSBA (IS
Auditing)</I></B><X-TAB> </X-TAB><X-TAB> </X-TAB>Location:
<X-TAB> </X-TAB>S-204A<BR>
<DD>Staff Programmer
Analyst<X-TAB> </X-TAB>
<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>Phone#<X-TAB> </X-TAB><X-TAB> </X-TAB>(858)
651-0316 <BR>
<DD>QUALCOMM Incorporated.<X-TAB> </X-TAB>
<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>Fax
#
<X-TAB> </X-TAB><X-TAB> </X-TAB>(858)
658-1011<BR>
<DD>IT Product Development
Services<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>EMail
: jyin@qualcomm.com <BR></I></B>
<DD><FONT color=#0000ff size=4>"TEAM</I></B> - T</I></B>ogether
E</I></B>veryone A</I></B>ccomplishes M</I></B>ore" <BR></FONT>
<DD>==================================================<FONT color=#ff0000
size=4> <BR></FONT></DD></DL></BLOCKQUOTE><X-SIGSEP>
<P></X-SIGSEP>
<DL></DL>=====================================================================
<BR><FONT size=4><B><I>Joseph C. Yin</I></B>, <B><I>MSBA (IS
Auditing)</I></B><X-TAB> </X-TAB><X-TAB> </X-TAB></FONT><B><I>Location:
<X-TAB> </X-TAB>S-204A<BR>Staff Programmer
Analyst<X-TAB> </X-TAB>
<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>Phone#<X-TAB> </X-TAB><X-TAB> </X-TAB>(858)
651-0316 <BR>QUALCOMM Incorporated.<X-TAB> </X-TAB>
<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>Fax
#
<X-TAB> </X-TAB><X-TAB> </X-TAB>(858)
658-1011<BR>IT Product Development
Services<X-TAB> </X-TAB><X-TAB> </X-TAB><X-TAB> </X-TAB>EMail
: jyin@qualcomm.com <BR></I></B><FONT color=#0000ff size=4>"<B><I>TEAM</I></B>
- <B><I>T</I></B>ogether <B><I>E</I></B>veryone <B><I>A</I></B>ccomplishes
<B><I>M</I></B>ore" <BR></FONT><FONT
size=4>==================================================</FONT><FONT
color=#ff0000 size=4> </FONT></BLOCKQUOTE></BODY></HTML>