Go Back   Velocity Reviews > Newsgroups > Java
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

Java - Trying to write 
 into XML document

 
Thread Tools Search this Thread
Old 05-14-2004, 10:04 AM   #1
JM
 
Posts: n/a
Default Trying to write 
 into XML document

Hi,

I am trying to write the string 
 into a UTF-16 XML document using
javax.xml.parsers.DocumentBuilder and I can't get it to work. I have
googled for a few days but cannot seem to find the solution. I am
hoping someone here can point me in the right direction.

Basically, I have a string containing /r/n that I am trying to write
into a UTF-16 document as 
 


So far I have only got it to come out as actual carriage returns/line
feeds or as 


I must be missing something somewhere

Any help would be greatly appreciated.

Cheers,
JM

  Reply With Quote
Old 05-14-2004, 10:38 AM   #2
Gorf
 
Posts: n/a
Default Re: Trying to write 
 into XML document

<JM> wrote in message news:...
> Hi,
>
> I am trying to write the string &#xD; into a UTF-16 XML document using
> javax.xml.parsers.DocumentBuilder and I can't get it to work. I have
> googled for a few days but cannot seem to find the solution. I am
> hoping someone here can point me in the right direction.
>
> Basically, I have a string containing /r/n that I am trying to write
> into a UTF-16 document as &#xD; &#xA;
>
> So far I have only got it to come out as actual carriage returns/line
> feeds or as &amp;#xD;&amp;#xA;
>
> I must be missing something somewhere
>
> Any help would be greatly appreciated.


CDATA?


--
Gorf


  Reply With Quote
Old 05-14-2004, 11:36 AM   #3
JM
 
Posts: n/a
Default Re: Trying to write &#xD; into XML document

On Fri, 14 May 2004 11:38:51 +0100, "Gorf" <>
wrote:

>> Basically, I have a string containing /r/n that I am trying to write
>> into a UTF-16 document as &#xD; &#xA;

>CDATA?


Thanks for the reply.

Sensible idea, but unfortunately that won't do. I have this
application that stores its data as XML, and text entered in the
application has it's /r/n's translated to &#xD; &#xA;, they don't use
CDATA sections.

I want to create the XML data files for that application via an
automated import process, and therefore I am stuck with using the
format they chose to use, i.e. with the converted newlines.

Cheers,
JM

  Reply With Quote
Old 05-14-2004, 03:54 PM   #4
Chris Smith
 
Posts: n/a
Default Re: Trying to write &#xD; into XML document

JM <> wrote:
> I am trying to write the string &#xD; into a UTF-16 XML document using
> javax.xml.parsers.DocumentBuilder and I can't get it to work.


DocumentBuilder is for parsing an XML file into a document, not for
creating an XML file from a document. What are you really trying?

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
write and create a pdf file from a document Narendra Software 1 07-29-2009 02:37 PM
How to burn (write) ISO file to CD/DVD disc westenroad Software 6 06-27-2009 07:21 AM
appending xml document in C# kanjali Software 0 04-18-2008 01:31 PM
File download dialog box is coming while opening the document using Servlet aarthi Software 0 04-24-2007 02:20 PM
"Failed To Set Write Parameters!" Bubba Do Wah Ditty DVD Video 0 05-19-2004 08:06 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47