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

Discussion in 'ASP .Net' started by st@jpa.co.jp, Oct 11, 2005.

  1. Guest

    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
     
    , Oct 11, 2005
    #1
    1. Advertising

  2. Rosanne Guest

    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

    --
    Rosann
    -----------------------------------------------------------------------
    Rosanne's Profile: http://www.highdots.com/forums/m28
    View this thread: http://www.highdots.com/forums/t302055
     
    Rosanne, Oct 11, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shoval Tomer
    Replies:
    0
    Views:
    467
    Shoval Tomer
    Jul 9, 2003
  2. Bob
    Replies:
    1
    Views:
    1,307
    Rick Strahl [MVP]
    Jul 20, 2004
  3. Bob
    Replies:
    0
    Views:
    424
  4. =?Utf-8?B?RGFuaWVs?=

    Fail to save xmldocument

    =?Utf-8?B?RGFuaWVs?=, Nov 24, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    454
    Patrick.O.Ige
    Nov 24, 2005
  5. Francesc Guim Bernat

    Question about XmlDocument->Save method

    Francesc Guim Bernat, Oct 14, 2003, in forum: XML
    Replies:
    1
    Views:
    1,103
    Martin Honnen
    Oct 14, 2003
Loading...

Share This Page