Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2005, 07:24 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default simple xml / xslt example needed

hi,

can anyone please point me to a simple VB.Net example
of how i can do an xslt transform ?

i have a .aspx web page that needs to create a letter for
subsequent printing. i am using a xslt style document which
holds the letter text plus style details of my xml data.

i have generated an xml data file of my letter details record.

all i need now is how to do the transform in vb.net and send it
to a printer. any good examples or recommended books ?

cheers.


 
Old January 17th, 2005, 04:55 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

Check out this link..Hope this helps you
http://www.asp101.com/articles/jayram/xslt/default.asp


 
Old January 21st, 2005, 02:10 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Let me give you the code snippet for transforming a simple VB.NET code. But I am not sure whether this is what you are looking for. Do write back if you are looking for something else.

Namespace declarations:
Imports System.Xml
Imports System.Xml.Xsl

Code to transform:

Dim xslt As New XslTransform()

Try
  xslt.Load("transform.xslt")
  xslt.Transform("source.xml","result.xml")
Catch ex As Xsl.XsltException
  Console.WriteLine("transform failed"
Catch ex As Exception
  Console.WriteLine(ex.Message & " " & ex.StackTrace
End Try

Note that i have used the basic transformation. Actually there are 18 odd overloaded transform methods.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple XSLT Problem (HELP PLEASE) gaeawalker XSLT 2 October 10th, 2007 10:27 AM
simple XSLT question _thinking XSLT 4 January 24th, 2006 10:41 AM
Problem applying simple XSLT to XML to create CSV gregclark XSLT 2 August 25th, 2005 07:30 AM
Simple question about XSLT bertcox XSLT 2 May 5th, 2004 09:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.