473,785 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Enc oding.Default)

xslTran.Load("C :\Customer.xslt ", New Xml.XmlUrlResol ver)
xslTran.Transfo rm(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 1737
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.Enc oding.Default)

xslTran.Load("C :\Customer.xslt ", New Xml.XmlUrlResol ver)
xslTran.Transfo rm(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
14879
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
2620
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 a header e.g: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
4
11765
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. &apos;, &amp;) to the appropriate character (though NS 6.2 works fine). Obviously I can get round this for particular entities by writing some code to do the conversion before using document.write - but I need a more general solution that will catch any of the...
3
14830
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 width=75%border=1>");
2
1728
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 into my database a question like 'How do you make a letter/word in HTML bold? Now i put the answer <b></b> Now i have to write out the answer but when i do this it dosent write out on the page as it is HTML. I know that it should be written to...
6
2608
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 using a Microsoft product, hear me out! :>) Where I used to use Frontpage in WYSISYG mode, I have completely forgone that and now use it in text edit mode. It's actually a pretty powerful html editor. There are certain features that Frontpage...
0
3180
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 (a logo). When saving it to an HTM file - it saves the picture - but puts it into a local folder - for later retrieval. I am deriving the spreadsheet via VB.net code in asp.net environment and streaming the output via the respnse object (setting...
8
12906
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 doing. So please bear with me as I try to figure this out as I go. But first, just starting out, outputting the first line of the HTML already has me lost with all the competing quotes/unquotes. How do I write out this first line using Python? ...
0
1124
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 raed file from local and write it to server.) Thanking you!
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10162
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4061
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.