472,960 Members | 1,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Transform Dataset using XSL in-place?

Hello,

I'm trying to apply an XSL to a dataset contents. More specifically, I
want to apply an XSL to a dataset or an XmlDataDocument and put the
resulting transformed data back into another DataSet or simply to
modify the current DataSet. The first part is easy:

Dim xmlDataDoc as XmlDataDocument = new XmlDataDocument(oracleDS)

Dim xslTrans as XslTransform = new XslTransform
xslTrans.Load("stylesheet.xsl")
xslTrans.Transform(xmlDataDoc, Nothing.. Stream)

Dim resultDS as new DataSet()
resultDS.ReadXml(?)

The problem becomes that XslTransform.Transform wants to output to a
stream and I would rather output to a DataSet. (Yes, I know that
transforming one DataSet to another DataSet is wrong, slow and
ineffecient). Is there a way to avoid the stream in the middle..

Thanks,
Geoffeg
Nov 12 '05 #1
1 3233
Geoffrey Gallaway wrote:
Dim xmlDataDoc as XmlDataDocument = new XmlDataDocument(oracleDS)

Dim xslTrans as XslTransform = new XslTransform
xslTrans.Load("stylesheet.xsl")
xslTrans.Transform(xmlDataDoc, Nothing.. Stream)

Dim resultDS as new DataSet()
resultDS.ReadXml(?)

The problem becomes that XslTransform.Transform wants to output to a
stream and I would rather output to a DataSet. (Yes, I know that
transforming one DataSet to another DataSet is wrong, slow and
ineffecient). Is there a way to avoid the stream in the middle..


Sure. Transform to XmlReader and then load new DataSet from it.

--
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

8
by: Luther Miller | last post by:
I am using the XML tranform functionality in .NET to transform data in a DataSet into XMLSS using an XSLT file I have created. There are about 100 columns and only about 120 rows in the data...
2
by: Patrick J. Schouten | last post by:
I am trying to transfor an XML document prior to loading into a Dataset. My problem stems from the known bug in Visual Studio that prevents loading a well formed XML because of duplicate child...
2
by: Pete G. | last post by:
I'm trying to do a transform to a simple data set. When Exported the Dataset XML looks like this: <RFAData xmlns="http://tempuri.org/RFAData.xsd"> <RFA_Project> <ProjectID>11729</ProjectID>...
0
by: Rocio | last post by:
I have a dataset with 5 columns. The first 4 columns are simply string columns, but the last one is another dataset with 4 simple columns. The problem is that, the XSLT transform only reads data...
3
by: Matthias Marx | last post by:
Hi, May some one could help me. I want to transform data, coming from SQL Server and loaded to a dataset wiuth xslt. After that, I want convert it by a xslt style sheet, and store it...
3
by: Rouven Hertenstein | last post by:
Hi, I'm trying to test the vb.net-exercise "How to use a DataSet with the Office XP Chart Component and ASP.NET" on http://support.microsoft.com/kb/303016/en-us Visual Studio rails against the...
7
by: Doug Heeren | last post by:
I have the following section of VB.NET code that transforms a simple dataset into an Excel xml workbook. It works fine for < 50 rows or so, but I have about 8,000 rows I need to transform. Is there...
5
by: Jason | last post by:
Hello, I am working on a problem which requires me to take a String variable containing some Xml, transform it using Xslt, and dump the result into a DataSet. What would be the quickest way...
0
by: Terry Brown | last post by:
I have an xml file: <?xml version="1.0" encoding="utf-8" ?> <G2Registers xmlns="http://tempuri.org/registers.xsd"> <register> <name>Version Register</name> <address>"00000000"</address>...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.