473,396 Members | 2,147 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,396 software developers and data experts.

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

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
1 1716
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: johnathan | last post by:
How can I use a php script running on my web server to read in the html source from an arbitrary webpage and then write it to a file on my web server?
3
by: db | last post by:
Hello all, I hope this is the correct newsgroup for this question. Does anybody know how I can write a html-header with python(cgi)? The problem is, I have a few html templates in which I have...
4
by: Geoff Wilkins | last post by:
I must confess I only come here when I have a problem - so my apologies if this has been raised before: Using my IE v.6 browser, document.write doesn't convert HTML entities (e.g. ', &) to...
3
by: Yiu | last post by:
Here is my code: private static ArrayList info=new ArrayList(); private Label label; private void Page_Load(object sender, System.EventArgs e) { label=new Label; Response.Write("<table...
2
by: polilop | last post by:
OK i know it sounds little bit wierd but here is what i have to do. I have a database in which i store questions and answers, but the questions are about HTML, Javascript, ASP...... So i store...
6
by: Viken Karaguesian | last post by:
Hello everyone, I'm just wondering what you all use to write and edit your HTML and organize your websites. I currently use Microsoft Frontpage 2003. Hold on! Before you all jump on me for...
0
by: frankkirchner | last post by:
There has to be a way to get an image into the XSLT transormation process so that it shows up on a Formatted Excel Spreadsheet. When saving an Excel spreadsheet to XML format - you lose the image...
8
by: jld730 | last post by:
I have been given a snippet of HTML code that I am to use Python to write it out. I am somewhat new to Python, and completely new to HTML, so I'm still unclear on what it is I am supposed to be...
0
by: Swan | last post by:
Can anyone plz tell me,Can I write file on server using binary access,or it is only to write on local?(Actually I am creating OCX for Http File Upload Control in VB using API's.So for that I need to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.