Transforming Xml Data Into Html

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Transforming Xml Data Into Html - Presentation Transcript

    1. Transforming XML data into HTML http://www.livetolearn.in
    2. XSL
      • An Extensible stylesheet Language (XSL) transformation pulls data from XML nodes and renders the content according to given instructions
      • We can render the raw data as attractive HTML on an ASP.NET page.
      http://www.livetolearn.in
      • Add a new XML file named links.xml to the App_Data folder
      • Enter the following sample data:
      <? xml version = &quot; 1.0 &quot; encoding = &quot; utf-8 &quot; ?> < links > < link > < title > Microsoft Official ASP.NET site </ title > < url > http://www.asp.net </ url > < description > The primary site for ASP.NET developers. </ description > </ link > < link > < title > Collection of Tutorials, Ebooks, Videos </ title > < url > http://www.livetolearn.in </ url > < description > Computer Programming Tutorials, Tutorial Sites, E-books, Videos, Powerpoint Presentations </ description > </ link > </ links > http://www.livetolearn.in
    3. Add xslt stylesheet file in root folder and replace with the following content <? xml version =&quot;1.0&quot; encoding =&quot;utf-8&quot;?> < xsl:stylesheet version =&quot;1.0&quot; xmlns:xsl =&quot;http://www.w3.org/1999/XSL/Transform&quot;> < xsl:template match =&quot;/links&quot;> < xsl:for-each select =&quot;link&quot; > < p class =&quot;headingtitle&quot;> < xsl:value-of select =&quot;title&quot;/> </ p > < div class =&quot;content&quot;> URL: < xsl:value-of select =&quot;url&quot;/> </ div > Description: < xsl:value-of select =&quot;description&quot;/> < hr /> </ xsl:for-each > </ xsl:template > </ xsl:stylesheet > http://www.livetolearn.in
      • Add a asp.net page xmltohtml.aspx
      • Add a Xml Control from Toolbox
      • On the Xml control’s property window set the following properties
      http://www.livetolearn.in
      • Now, add styles as you want with in <head> tag in the aspx file
      • For example add the following code or define it by clicking New Style in the sidebar
      < style type =&quot;text/css&quot;> .headingtitle { font-weight: bold; background-color: #FFFF00; border-style: ridge; } .content { background-color: #99CCFF; font-weight: bold; border-style: outset; } </ style > http://www.livetolearn.in
    4. Now, browse it (F5 / Ctrl+F5) http://www.livetolearn.in
    SlideShare Zeitgeist 2009

    + Karthi RKarthi R Nominate

    custom

    187 views, 0 favs, 2 embeds more stats

    Transforming XML data into HTML Markup
    by
    http://ww more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 187
      • 184 on SlideShare
      • 3 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 7
    Most viewed embeds
    • 2 views on http://www.livetolearn.in
    • 1 views on http://livetolearn.in

    more

    All embeds
    • 2 views on http://www.livetolearn.in
    • 1 views on http://livetolearn.in

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Tags