C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » XML »

Show XML Content Using XSLT Using C#


Posted Date: 04 May 2009    Resource Type: Articles    Category: XML
Author: Lakhan PalMember Level: Diamond    
Rating: 1 out of 5Points: 5




XmlDocument docXML = new XmlDocument();
XslTransform docXSL = new XslTransform();
docXML.Load(Server.MapPath("sample1.xml"));
docXSL.Load(Server.MapPath("sample1.xslt"));
Xml1.Document = docXML;
Xml1.Transform = docXSL;


Please find the attached "sample.xml" and "sample.xslt" files.

above code will first load the xml document and then apply the xtensible style sheet on that document.

Output of the above code will be like this:
Author: Lakhan Pal Garg
Email ID:lakhangarg@gmail.com
Blog:http://www.lakhangarg.blogspot.com

Headings will be in bold.

Attachments

  • Sample Files (28176-4259-sample1.zip)


  • Responses


    No responses found. Be the first to respond and make money from revenue sharing program.

    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    XSSLT  .  XML  .  Transforming  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Purpose of XML Namespaces
    Previous Resource: What is XML, XSL?
    Return to Discussion Resource Index
    Post New Resource
    Category: XML


    Post resources and earn money!
     
    More Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use