How to Transform XML using XSLT in ASP.NET using C#.

  • I'm Using Asp.Net with C#..

    i'm having XML Data in my Database Table(C_Details --> Table Name)

    ie Column: Get_Time_Data -->XML (Datatype)

    ========================================================================

    &ltGiven_Time&gt

    &ltDate Value="8/23/2008"&gt

    &ltTime Clicks="1" Views="6" No="1" /&gt

    &ltTime Clicks="2" Views="5" No="2" /&gt

    &ltTime Clicks="1" Views="9" No="3" /&gt

    &ltTime Clicks="3" Views="7" No="4" /&gt

    &ltTime Clicks="7" Views="8" No="5" /&gt

    &lt/Date&gt

    &ltDate Value="8/24/2008"&gt

    &ltTime Clicks="" Views="1" No="1" /&gt

    &ltTime Clicks="" Views="5" No="2" /&gt

    &ltTime Clicks="" Views="8" No="3" /&gt

    &ltTime Clicks="" Views="9" No="4" /&gt

    &ltTime Clicks="" Views="7" No="5" /&gt

    &lt/Date&gt

    &ltDate Value="8/25/2008"&gt

    &ltTime Clicks="" Views="1" No="1" /&gt

    ----------

    ----------

    &lt/Date&gt

    ----------

    ----------

    &ltDate Value="8/27/2008"&gt

    &ltTime Clicks="" Views="1" No="1" /&gt

    ----------------------------

    -----------------------------

    &lt/Date&gt

    &lt/Given_Time&gt

    ========================================================================

    (I'm LOOPING this &ltDates&gt wrt Start_Date & Ende_Date in this XML Data)..

    Here i'm having Only XML format Data in XML Datatype Column..

    But Not XML File(as xml1.xml)

    I want the XSLT format for this XML Format Data in C#..

    How to transform XML Data using XSLT in ASP.NET using C#...

    Thank You..

  • have a look at the classes in the System.Xml.Xsl namespace.

    In particular this one: XslCompiledTransform. It has a Transform() method that will do what you want.

    ---------------------------------------
    elsasoft.org

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply