473,327 Members | 1,920 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,327 software developers and data experts.

XML Transformations

I am trying to code vb.net to perform XML transformations
by applying a style sheet to a XML doc. All of my XML and
XSLT documents will be in either XML DOM Objects or string
variables. I am not reading anything from Disk.

Prior to .NET, I would this with the following code:
------ ******************* --------
'Load Source cXML into DOM object
Set objSource = server.CreateObject("microsoft.xmldom")
objSource.loadXML(SourceXML)

'Load the Style Sheet
Set objStyle = server.CreateObject("microsoft.xmldom")
objStyle.load(XSLT stylesheet)

'Set up the Output XMLdocument.
Set objSSXML = server.CreateObject("microsoft.xmldom")

' Parse results into a result DOM Document.
call objSource.transformNodeToObject(objStyle, objSSXML)

------ ******************* --------

In .NET, there is no longer a "transformNodeToObject"
method. It doesn't exist. I now have to use
the "XslTransform" object. I have found at least 1/2
dozen different code examples on the MSDN site showing how
you would use the "Transform" method, yet not one example
will compile. For example, here is one sample code
snippet I found:

Imports System
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
Imports System.Xml.Xsl
Public Class Sample()
Dim xslt as XslTransform = new XslTransform()
Xslt.Load(someStylesheet)
Dim doc as XPathDocument = New XPathDocument("books.xml")
Dim fs as StringWriter = new StringWriter()
Xslt.Transform(doc, Nothing, fs, Nothing);
End Class

As soon as I copy that into my .NET application, the last
line "Xslt.Transform....." gets underlined indicating an
error and if I try to compile I get a "Overload resolution
failed because no accessible 'Transform' accepts this
number of arguments".

Has anyone had any success performing transformations
where all XML data is String data in memory? If so, how
are you doing it? Thanks.
Jul 19 '05 #1
0 1500

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Franck Perrin | last post by:
I'd like to know if there is a way to apply to successive XSL transformations on one XML file. I got this XML file : <page Action="N047"> <data defaultName="c0dos010" Type="String"...
0
by: Mike | last post by:
I am trying to code vb.net to perform XML transformations by applying a style sheet to a XML doc. All of my XML and XSLT documents will be in either XML DOM Objects or string variables. I am not...
5
by: Keith Chadwick | last post by:
I am migrating an existing ASP app that uses XSLT transformations to render against a language XML doc for localization and other items. When I moved this logic into .NET and the native xml and xsl...
1
by: Chris | last post by:
I am doing a little research into the xml web server control and in particular the ability to do transformations with it. However all's I can see is the ability to feed in from an actual xml file....
6
by: Christopher | last post by:
I am currently in the process of evaluating the performance hits of moving to the .NET platform for our application. I created a sample project that loads the transforms the same XML and XSLT in...
1
by: George Durzi | last post by:
Folks, I'm running into some performance issues with my Xsl transformations. I've done a ton of debugging and digging around, and have come to the conclusion that the performance issues are NOT...
0
by: GSK | last post by:
I notice that when working with a medium sized XML file, (a few hundred K), that contains maybe a couple of hundred nodes, that it takes quite a while to transform the document using an XSL...
0
by: Alain Frisch | last post by:
Hello, I'd like to announce a new small language for XML transformation, called XStream. Transformations written in XStream are compiled into efficient XML stream processors: the output is...
0
by: Hoax | last post by:
I didn't see a forum for OpenGL so i assume it would go here. I've having an issues with my camera interfering with the transformations of my geometry. Here is my Display() code, I think it's...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.