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

Dont want to write xsl transformation(html) to a file

P: n/a
Hi,

My problem is that I dont want to output the transformed xml to a file! I
convert a Dataset to xml and then apply the transformation using xsl.

Dim xmlDoc As XmlDataDocument = New XmlDataDocument(ds)
Dim xslTran As XslTransform = New XslTransform
Dim writer As XmlTextWriter = New XmlTextWriter("C:\Test.xml",
System.Text.Encoding.Default)

xslTran.Load("C:\Customer.xslt", New Xml.XmlUrlResolver)
xslTran.Transform(xmlDoc, Nothing, writer, Nothing)
writer.Close()

Now instead of writing to the file Test.xml I want to store the html in a
string variable. Is this possible? Can someone please help me?

Thanx
Edwin

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Edwin Loubser wrote:
My problem is that I dont want to output the transformed xml to a file! I
convert a Dataset to xml and then apply the transformation using xsl.

Dim xmlDoc As XmlDataDocument = New XmlDataDocument(ds)
Dim xslTran As XslTransform = New XslTransform
Dim writer As XmlTextWriter = New XmlTextWriter("C:\Test.xml",
System.Text.Encoding.Default)

xslTran.Load("C:\Customer.xslt", New Xml.XmlUrlResolver)
xslTran.Transform(xmlDoc, Nothing, writer, Nothing)
writer.Close()

Now instead of writing to the file Test.xml I want to store the html in a
string variable. Is this possible? Can someone please help me?


Sure. Transform to StringWriter instead of XmlTextWriter.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.