Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Trying to write 
 into XML document

Reply
Thread Tools

Trying to write 
 into XML document

 
 
JM
Guest
Posts: n/a
 
      05-14-2004
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
 
 
 
 
Gorf
Guest
Posts: n/a
 
      05-14-2004
<JM> wrote in message news:(E-Mail Removed)...
> 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
 
 
 
 
JM
Guest
Posts: n/a
 
      05-14-2004
On Fri, 14 May 2004 11:38:51 +0100, "Gorf" <(E-Mail Removed)>
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
 
Chris Smith
Guest
Posts: n/a
 
      05-14-2004
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

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
document.write() in the middle of a document? jullag Javascript 20 09-22-2005 02:29 PM
Refer to an XML document from within an XML document Manish Hatwalne XML 1 07-13-2004 10:24 AM
trying to document.write() a SSI Greg Brant Javascript 8 01-30-2004 01:57 AM
Help on including one XML document within another XML document using XML Schemas Tony Prichard XML 0 12-12-2003 03:18 PM
how to write some xml into huge xml file into speceific location??? Xenia XML 4 11-25-2003 07:14 PM



Advertisments