xmlDocument.Save "
" getting changed changed to "&#10"

S

st

Hi,

I'm using xmlDocument.Save(xmlTextWriter) to create an Excel-readable
file. All works well, except where I've replaced the carriage return
chars in the .innertext to XML-compliant "&#10"; It gets changed to
"&#10" and doesn't render new lines in the Excel sheet.

Can anyone help?

Many thanks,

Simon Lane
 
R

Rosanne

The XML reader can't handle ampersands. Before you save it somewher
you have to replace the ampersand characters:

replace (strMyString, "&", "&").

Then when you are reading it back out - to display on the screen o
whatever you need to put the ampersand character back so it'
viewable:

replace (strMyString, "&", "&").

If the XML reader comes across an ampersand character it just stops.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top