473,662 Members | 2,622 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSLT & Webservice

Hi,

I'm consuming a webservice which returns an XMLNode with VB.NET and XSLT and
sending the output to Response.Output Stream
If I feed the returned XMLNode directly in the transform method, I get an
error:

System.InvalidO perationExcepti on: The specified node cannot be inserted as
the valid child of this node, because the specified node is the wrong type.

If I first serialize the node to a string and then load a new document with
that string it works fine. Can anybody explain me why that is?

Thanx,

Corno
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim webservice As New webservice.main

Dim source As XmlNode = webservice.getX MLFile()

'IF I LEAVE THE NEXT FOUR LINES OUT, I GET THE ERROR
Dim intermediateStr ing As String = source.OuterXml
Dim intermediateDoc As New XmlDocument
intermediateDoc .LoadXml(interm ediateString)
source = intermediateDoc

Dim xslDoc As New XslTransform
xslDoc.Load(Ser ver.MapPath("te st.xslt"))

xslDoc.Transfor m(source, Nothing, Response.Output Stream, Nothing)
End Sub
Nov 12 '05 #1
0 1308

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

Similar topics

3
5698
by: J Trost | last post by:
I was wondering if anyone knows if it is possible to do basic string replacement using XSLT even though the strings being replaced may contain "<" and ">". Here is my problem: I need to be able to convert XML like this: <?xml version="1.0" encoding="UTF-8"?> <java version="1.4.2_03" class="java.beans.XMLDecoder"> <object class="javax.swing.JButton"> <string>Hello, world</string>
4
4809
by: Asbjørn Ulsberg | last post by:
Sorry for posting to a lot of groups, but I'm not sure what this problem relates to, so I thought it was better to be safe than sorry. Please feel free to set FUT to the proper group when answering. I'm having problems with the XSLT function 'document()' after upgrading to ASP.NET 1.1. I've started using XmlUrlResolver in the xslt.Transform() method, but it doesn't seem to help in all cases.
2
5280
by: chris | last post by:
Hi there, I create an XML file from a dataset like this: System.IO.StreamWriter xmlSW = new System.IO.StreamWriter(FILENAME); dsUserData1.WriteXml(xmlSW, XmlWriteMode.WriteSchema); xmlSW.Close(); Which gives me this XML file: <NewDataSet>
2
1640
by: Pawel | last post by:
I have small problem with XslTransformation. I get from WebService xml document. I have xslt and I want transform xml document to html code. It's look easy but I cant't manage with xPath. Maybe someone help me with that. I have problems with xPath in xslt file. I can't navigate by names only by vertical and horizontal axis. What's wrong .... --- Code --- // WebService XmlForAnalysis.Xmla xa = new XmlForAnalysis.Xmla(); xa.Url =...
1
1485
by: WStoreyII | last post by:
Two question, 1) is there a way to edit the interface of the display for when accessing a asmx file through the browser as opposed to that default web service interface. For example what if i wanted to use a dropdown list for one of the paramaters. if this is possible how html, xslt ? 2) can i assign a xslt style sheet to a xml webservices output. Lile instead of accessing the webservice from code. THe user can access the
4
2094
by: WStoreyII | last post by:
I wish to know how to set it up so that when an xml webservice is called that instead of displaying the xml in the browser it will render it with a xslt file the problem is i dont know how to do this? Thanks again WStoreyII
3
2008
by: crc128 | last post by:
Hi, I'm looking at using XML and XSLT with apache cocoon to automatically generate html files for a site. the problem I'm having is that I want one of the pages to display a google map, but the google API requires the following line in the output HTML: <script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg" type="text/javascript"> The problem is that I can't get the '&' to properly make it into the result. I can get &amp;. ...
1
1997
by: neerom | last post by:
Hi I need to call webservice from xslt in HTTP POST Method. The MSXML should be used. I am using javascript. I have an XML File which is having Integer Node.....Shown Below <?xml version="1.0" encoding="utf-8" ?> <NumberSet> <integer> <a>10</a> <b>12</b>
0
8857
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
8764
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
8546
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
7367
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...
0
4180
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
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
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
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1752
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.