XML Transformation, Problem with & Sign,help please

Last post 09-12-2008 12:18 PM by haoest. 2 replies.

Sort Posts:

  • XML Transformation, Problem with & Sign,help please

    09-11-2008, 8:53 PM
    • Participant
      1,768 point Participant
    • haoest
    • Member since 10-25-2005, 4:20 PM
    • Posts 403

     Hi,

     This may sound like a noob question, but I try to transform html into excel compatible format. I have both the data in html and xsl working. The problem is when there is a & sign in the data html, asp.net's transformation object freaks out and throws exception. What do I need to do to escape the character, and other than &, are there any other character I should escape?

     

    Thanks,

     

    Debugger is my best friend. (http://haoest.info)
  • Re: XML Transformation, Problem with & Sign,help please

    09-11-2008, 11:00 PM
    • Contributor
      7,249 point Contributor
    • whighfield
    • Member since 01-02-2006, 10:37 PM
    • Winterpeg, Manitoba
    • Posts 1,205

    for & use &

    for < use &lt;

    for > use &gt;

    for " use &quot;

    Please mark the most helpful reply/replies as "Answer".

    - William
    http://thefrozencoder.ca
  • Re: XML Transformation, Problem with & Sign,help please

    09-12-2008, 12:18 PM
    Answer
    • Participant
      1,768 point Participant
    • haoest
    • Member since 10-25-2005, 4:20 PM
    • Posts 403

     actually, any presence of the & sign throws the transformer off. &amp; contains & in the first place!!!

    It was tedious, but I wrapped all cell contents with <![CData[ ... ]]>  and it was happy.

     

    Thanks for trying.

    Debugger is my best friend. (http://haoest.info)
Page 1 of 1 (3 items)