[jdom-interest] Adding content to CDATA
New, Cecil (GEAE)
cecil.new at ae.ge.com
Mon Sep 22 13:49:20 PDT 2003
The other choice is to "link" to it. This is the approach taken by HTML
"containing" binary images.
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.
-----Original Message-----
From: Joseph Yin [mailto:jyin at qualcomm.com]
Sent: Monday, September 22, 2003 3:13 PM
To: jdom-interest at jdom.org; New, Cecil (GEAE)
Subject: RE: [jdom-interest] Adding content to CDATA
Hi there:
Is there a way to get the content in Binary only without the Base64 encoder.
Thanks, Joseph
At 02:02 PM 9/22/2003 -0400, New, Cecil (GEAE) wrote:
Use a Base64 encoder. This makes the binary data ascii text (also increases
the size of the data).
-----Original Message-----
From: Joseph Yin [ mailto:jyin at qualcomm.com <mailto:jyin at qualcomm.com> ]
Sent: Monday, September 22, 2003 1:08 PM
To: jdom-interest at jdom.org
Subject: [jdom-interest] Adding content to CDATA
Importance: High
Hi there:
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???
Thanks for your assistance.
Best, Joseph Yin
=====================================================================
Joseph C. Yin, MSBA (IS Auditing) Location: S-204A
Staff Programmer Analyst Phone#
(858) 651-0316
QUALCOMM Incorporated. Fax #
(858) 658-1011
IT Product Development Services EMail : jyin at qualcomm.com
"TEAM - Together Everyone Accomplishes More"
==================================================
=====================================================================
Joseph C. Yin, MSBA (IS Auditing) Location: S-204A
Staff Programmer Analyst Phone#
(858) 651-0316
QUALCOMM Incorporated. Fax #
(858) 658-1011
IT Product Development Services EMail : jyin at qualcomm.com
"TEAM - Together Everyone Accomplishes More"
==================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20030922/9085d9f4/attachment.htm
More information about the jdom-interest
mailing list