473,795 Members | 2,986 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.
Jul 19 '05 #1
0 1528

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

Similar topics

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 :
0
866
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)
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
1121
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
3238
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
1930
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
889
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...
0
969
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
9672
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
10439
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10001
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...
1
7541
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
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
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...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
3
2920
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.