473,804 Members | 3,229 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.CreateOb ject("microsoft .xmldom")
objSource.loadX ML(SourceXML)

'Load the Style Sheet
Set objStyle = server.CreateOb ject("microsoft .xmldom")
objStyle.load(X SLT stylesheet)

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

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

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

In .NET, there is no longer a "transformNodeT oObject"
method. It doesn't exist. I now have to use
the "XslTransfo rm" 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.XPat h
Imports System.Xml.Xsl
Public Class Sample()
Dim xslt as XslTransform = new XslTransform()
Xslt.Load(someS tylesheet)
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.
Nov 12 '05 #1
0 866

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

Similar topics

0
1529
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 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)
0
1766
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" CustomName=""/> <data defaultName="clxc0233" Type="String" CustomName="EndDate"/> </page> I want to generate java code like this :
5
2563
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 objects I noticed a significant processor hit on the web machine. The xml file is roughly 110KB and the XSLT files, the called transformation has several includes, is in total about 20KB. I have run the application test center on the page which...
1
1122
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. This doesn't seem very scalable if you want have a high volume dynamic web page like a product catalogue. Is there any way to bind the xml control to a dataset, or something a little more like that.
6
3239
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 COM, COM using interop and in C# and then transforms it to HTML. I also tried concatenating the XML and XSL as a string and then loading it to the DOM once as opposed to loading the DOM with the appendChild() method. I see that the C# version is...
1
1931
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 caused by slow stored procedures, or bad XSL/Ts. I came to this conclusion by doing a test transformation in client-side code instead of server side aspx, as shown at the bottom of this post. The transformations were super-fast. However, the...
0
891
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 stylesheet, plus the CPU really works. In comparison, if I parse the document and create controls (i.e. Label) instead, the page seems to load much quicker. Can anyone comment, in general, on the efficiency of using the XmlDocument class for...
0
1322
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 computed and produced while the input is being parsed, which makes it possible to run some transformations on very big XML documents which could not even fit in memory. The programmer does not have to worry about streaming or buffering, this is all...
5
1470
by: Seesharp2008 | last post by:
Hi guys! I want to do a sequence of transformations on an xml file. here is the scenario: Input.xml-------XSLT------>output.xml------XSLT------->output.xml....... for fulfiling this i have to save the first output on my hard disk and then use it again. What I have done is to copy the out put in to a temp.xml file , delete the out put file and use the temp.xml file as the input for the second transformation. But it fails and the...
0
970
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 pretty straight forward. void Display(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); eyePos.Set(0,0,10); //this is my wrist position
0
9708
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
9587
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
10340
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...
1
10324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10085
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
5662
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4302
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
3827
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2998
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.