473,324 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

xsl transform

i have a method which is return xml from a dataset using the dataset.GetXml
method.

can someone please post some example code of how i can transform this xml
using an xsl stylesheet?

i am only interested in the c# part of the code, not the xsl.

please note that my xml is coming from a method, not from a xml file.

thanks.
Nov 13 '05 #1
2 3630
Hi Nicholas...

Thanks for your help... but any change of some sample code? I am new to
..net and have been looking for a working solution on the net but I just
can't get it to work... its so annoying!

when i try it, either there is a problem about xmlresolver, or im trying to
create an abstract class, or something or another... im having nothing but
problems.

:-(
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote
in message news:es**************@TK2MSFTNGP12.phx.gbl...
Suzy,

If you have the XML in a string, then you can wrap that in a
StringReader class instance and then pass that XML to an XML document
instance. Also, you can load your transformation into an instance of the
XslTransform class. Once you have that, you can call one of the various
Transform overloads and pass your XmlDocument instance to it, transforming
it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"suzy" <me@nospam.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
i have a method which is return xml from a dataset using the

dataset.GetXml
method.

can someone please post some example code of how i can transform this xml using an xsl stylesheet?

i am only interested in the c# part of the code, not the xsl.

please note that my xml is coming from a method, not from a xml file.

thanks.


Nov 13 '05 #2
Suzy,

Check out the section of the .NET framework documentation titled "XSLT
Transformations with the XslTransform Class", located at (watch for line
wrap):

http://msdn.microsoft.com/library/de...sformclass.asp
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"suzy" <me@nospam.com> wrote in message
news:ef**************@TK2MSFTNGP10.phx.gbl...
Hi Nicholas...

Thanks for your help... but any change of some sample code? I am new to
.net and have been looking for a working solution on the net but I just
can't get it to work... its so annoying!

when i try it, either there is a problem about xmlresolver, or im trying to create an abstract class, or something or another... im having nothing but
problems.

:-(
"Nicholas Paldino [.NET/C# MVP]" <ni**************@exisconsulting.com> wrote in message news:es**************@TK2MSFTNGP12.phx.gbl...
Suzy,

If you have the XML in a string, then you can wrap that in a
StringReader class instance and then pass that XML to an XML document
instance. Also, you can load your transformation into an instance of the
XslTransform class. Once you have that, you can call one of the various
Transform overloads and pass your XmlDocument instance to it, transforming it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"suzy" <me@nospam.com> wrote in message
news:OH**************@TK2MSFTNGP10.phx.gbl...
i have a method which is return xml from a dataset using the

dataset.GetXml
method.

can someone please post some example code of how i can transform this

xml using an xsl stylesheet?

i am only interested in the c# part of the code, not the xsl.

please note that my xml is coming from a method, not from a xml file.

thanks.



Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Alex Vinokur | last post by:
Functor-parameters in the for_each() and transform() algorithms are passed by value. Might it make sense to have also algorithms for_each2() and transform2() which pass Functor-parameters by...
0
by: Xiaolei Li | last post by:
first off, i'm a total newbie at this stuff so excuse any wrong usage of terminology or whatever else. i have a XSL to transform a Document such that all "text" nodes will have a "SPAN" inserted...
2
by: John Lehmann | last post by:
I have an interesting problem. I am performing an XSL transform using the System.Xml.Xsl.Transform class. I have a database that contains the XSL style sheet string. And it seems to work pretty...
9
by: Patrick Guio | last post by:
Dear all, I am trying to use the std::transform algorithm to to the following vector< vector<char> >::iterator ik = keys.begin(); // key list iterator vector< vector<char> >::iterator is = ik;...
6
by: Stephen Cook | last post by:
Having worked through the problems around enabling the document function using an XmlUrlResolver I started work on building a useful class to hide the intricacies. Trying to generalise the process...
3
by: Jason S | last post by:
Hello Group, I am just about tearing my hair out with this one and thought someone may have some insight. I have a transform that wasn't working so I grabbed the nearest debugger (xselerator)...
4
by: schneider | last post by:
Anyone know if there is a way to dynamicly create a Xslt template/s and use them as an xml transform with-out use files for the Xslt? All the methods I see use files. I want to create a Xslt...
1
by: Mike Hofer | last post by:
I've got two statements in my code that are both generating weird, weird, weird messages: The first one was, Dim document As System.Xml.XmlDocument Dim navigator As...
4
by: Dean Card | last post by:
Okay, so here is the situation. I have need to do some on-the-fly image creation. I have everything working great except for the last part of it, applying a perspective type transform to the...
6
by: Vijai Kalyan | last post by:
Hello, I am trying to use std::transform to take in a collection of strings, transform them and insert the result into an output container. So, I wrote something like this: std::wstring...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.