By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,333 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,333 IT Pros & Developers. It's quick & easy.

xsl transform

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.