XmlDataSource and embeded HTML within your XML data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sleazy

    #1

    XmlDataSource and embeded HTML within your XML data

    Hi,

    I am attempting to right a news scroller control that is driven by and XML
    file. The way I have it set up is:

    <News>
    <Item Title="sometitl e">
    html content goes here
    </Item>
    </News>

    My hope was to be able to put the html for each news post in the middle of
    the Item elememts and then fetch those using an asp:DataList. Well everything
    works except that I loose my html tags. I get all the text but don't get
    links, formating, etc...

    I am using <%#XPath(".") %> to fetch the html content from the Xml in my
    DataList control. Is there a way to have the html tags make it to the browser
    using this setup?

    Thanks,

    Ryan
  • Laurent Bugnion

    #2
    Re: XmlDataSource and embeded HTML within your XML data

    Hi,

    Sleazy wrote:[color=blue]
    > Hi,
    >
    > I am attempting to right a news scroller control that is driven by and XML
    > file. The way I have it set up is:
    >
    > <News>
    > <Item Title="sometitl e">
    > html content goes here
    > </Item>
    > </News>
    >
    > My hope was to be able to put the html for each news post in the middle of
    > the Item elememts and then fetch those using an asp:DataList. Well everything
    > works except that I loose my html tags. I get all the text but don't get
    > links, formating, etc...
    >
    > I am using <%#XPath(".") %> to fetch the html content from the Xml in my
    > DataList control. Is there a way to have the html tags make it to the browser
    > using this setup?
    >
    > Thanks,
    >
    > Ryan[/color]

    I think that you need a CDATA section.
    Sorry! We can't seem to find the resource you're looking for


    HTH,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    Private/Malaysia: http://mypage.bluewin.ch/lbugnion
    Support children in Calcutta: http://www.calcutta-espoir.ch

    Comment

    • Walter Wang [MSFT]

      #3
      Re: XmlDataSource and embeded HTML within your XML data

      Thanks Laurent for your input.

      Hi Ryan,

      I agree with Laurent that you will need a CDATA section to store the HTML
      content. Please feel free to post here if you need more help and anything
      is unclear.


      Regards,
      Walter Wang
      Microsoft Online Community Support

      =============== =============== =============== =====
      When responding to posts, please "Reply to Group" via your newsreader so
      that others may learn and benefit from your issue.
      =============== =============== =============== =====

      This posting is provided "AS IS" with no warranties, and confers no rights.

      Comment

      Working...