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

Home Posts Topics Members FAQ

WebService output > Tab-separated text?

Hi all,

I'm receiving output from a webservice formatted as follows:

<?xml version="1.0" encoding="utf-8"?>
<DataSet xmlns="http://tempuri.org/adrloc/levering">
<xs:schema id="Bridgis_Dat aSet" xmlns=""
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="u rn:schemas-
microsoft-com:xml-msdata">
<xs:element name="Bridgis_D ataSet" msdata:IsDataSe t="true">
<xs:complexType >
<xs:choice maxOccurs="unbo unded">
<xs:element name="Bridgis_D ataTable">
<xs:complexType >
<xs:sequence>
<xs:element name="PSTK" type="xs:string " minOccurs="0" />
<xs:element name="STRAAT_NE N" type="xs:string "
minOccurs="0" />
<xs:element name="STRAAT_PT T" type="xs:string "
minOccurs="0" />
<xs:element name="STRAAT_OF F" type="xs:string "
minOccurs="0" />
<xs:element name="HUISNUMME R" type="xs:decima l"
minOccurs="0" />
<xs:element name="TOEVOEGIN G" type="xs:string "
minOccurs="0" />
<xs:element name="PERCEELCO D" type="xs:string "
minOccurs="0" />
<xs:element name="PLAATS_NE N" type="xs:string "
minOccurs="0" />
<xs:element name="PLAATS_PT T" type="xs:string "
minOccurs="0" />
<xs:element name="GEMEENTE" type="xs:string "
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgra m xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:diffgr="u rn:schemas-microsoft-com:xml-diffgram-v1">
<Bridgis_DataSe t xmlns="">
<Bridgis_DataTa ble diffgr:id="Brid gis_DataTable1"
msdata:rowOrder ="0" diffgr:hasChang es="inserted">
<PSTK>3544AA</PSTK>
<STRAAT_NEN>Zan dweg </STRAAT_NEN>
<STRAAT_PTT>ZAN DWG </STRAAT_PTT>
<STRAAT_OFF>Zan dweg
</STRAAT_OFF>
<HUISNUMMER>1 0</HUISNUMMER>
<TOEVOEGING> </TOEVOEGING>
<PERCEELCOD>T </PERCEELCOD>
<PLAATS_NEN>UTR ECHT </PLAATS_NEN>
<PLAATS_PTT>UTR ECHT </PLAATS_PTT>
<GEMEENTE>UTREC HT </GEMEENTE>
</Bridgis_DataTab le>
<Bridgis_DataTa ble diffgr:id="Brid gis_DataTable2"
msdata:rowOrder ="1" diffgr:hasChang es="inserted">
<PSTK>3544AA</PSTK>
<STRAAT_NEN>Zan dweg </STRAAT_NEN>
<STRAAT_PTT>ZAN DWG </STRAAT_PTT>
<STRAAT_OFF>Zan dweg
</STRAAT_OFF>
<HUISNUMMER>9 </HUISNUMMER>
<TOEVOEGING> </TOEVOEGING>
<PERCEELCOD>T </PERCEELCOD>
<PLAATS_NEN>UTR ECHT </PLAATS_NEN>
<PLAATS_PTT>UTR ECHT </PLAATS_PTT>
<GEMEENTE>UTREC HT </GEMEENTE>
</Bridgis_DataTab le>
</Bridgis_DataSet >
</diffgr:diffgram >
</DataSet>

The number of records can be very large. I need to transform this to a tab-
separated text file within an ASP script. At the moment I go about this as
follows (all code below is JScript):

---CODE---
strXML=String(r sXML(0));
oXMLDOM.loadXML (strXML);
oDatanodes=oXML DOM.getElements ByTagName("Brid gis_DataTable") ;
strOut+=WriteRo ws(oDatanodes);
---END---

Where WriteRows is:

---CODE---
function WriteRows(oData Nodes) {
strOut="";
for(i=0;i<oData nodes.length;i+ +) {
nRecords++;
aCh=new Array();
oDatanode=oData nodes.item(i);
nChildren=oData node.childNodes .length;
for(j=0;j<nChil dren;j++) {
oChild=oDatanod e.childNodes.it em(j);
aCh.push(oChild .text);
}
strOut+=aCh.joi n("\t")+"\n";
}
return strOut;
}
---END---

This is a very expensive operation which is not acceptable because the XML
recordsets i get are very large (can be up to 1,000,000 records), so I am
looking to implement a more efficient way to do this. I'm thinking about
XSLT but don't know how I would integrate this into my ASP script. Any
ideas?

Thanks,
Martijn
Jul 20 '05 #1
1 3131
> This is a very expensive operation which is not acceptable because the XML
recordsets i get are very large (can be up to 1,000,000 records), so I am
looking to implement a more efficient way to do this. I'm thinking about
XSLT but don't know how I would integrate this into my ASP script. Any
ideas?

Hi,

XSLT seems a bad idea in this case, I doubt if it would more efficient. The fastest way to do it is probably by ignoring the fact that it is XML and handling it as plain text.

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Ceterum censeo XML omnibus esse utendum
Jul 20 '05 #2

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

Similar topics

1
9906
by: ffhansix | last post by:
Hi, I am having problems with generating a c# proxy class from a IBM websphere WSDL file, when running the wsdl.exe to create the c# proxy file command i recieve an error: Warning: one or more operations were skipped. Warnings were encountered. Review generated source comments for more details.
3
3569
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it looks like the data is not transferred to the asp page from the web service. just after going to internet option -> security -> Custom level -> Access data sources across domains -> and check the enable radio -> the problem is fixed. I need a...
7
5407
by: stephan querengaesser | last post by:
hi ng, i try to invoke a webservice-method with an filter-object, that contains value types. if i don´t want to filter the return value of the method, i have to pass a new instance of the filter-object without setting any properties. but the value type-properties can´t be null and the filter is set to 0 (int) or false (bool). therefore i did implement the propertySpecified-pattern like this:
7
4990
by: Christian Wilhelm | last post by:
Hi! I'm trying to call a Java WebService out of a .net Client. There are two Methods, one Method requires one Parameter of type Parameter, the other Method requires one Parameter of type Parameter. I can call the first Method without Problems, the Parameter can be deserialized by the WebService. But if I want to call the second Method and give it an Array of Parameters, then the following exception is thrown by the WebService:...
2
2760
by: yqlu | last post by:
I hava developed a client in C# that is connected to a 3-party XML Web Services developed in Java based on the AXIS 1.1. Most methods call are successful except for one method named "findObjects" and return a complex type "FieldSearchResult". The error message as following : "Cannot assign object of type System.String to an object of type System.String. There is an error in XML document (23, 97)." By the way,I hava written a client in Java...
0
291
by: J | last post by:
I wrote a simple test webservice in .net but when I use the test page to try and run the webservice. IE does not recognize the output as an XML document, ie it doesn't automatically format the XML so that you can collapse or expand nodes. How can I get IE to recognize my webservice's output as XML?
3
2103
by: Monty | last post by:
OK, I had an issue with this and found lots of advice that did not apply, so I'm posting what I found hoping it might help someone else. Here's the sitch: you have a COM app that calls to a .Net assembly which in turn calls a web service. You know the web service is reachable and that the COM app is able to instantiate your .Net assembly (because you RegAsm'ed it and it's good to go). However, when you attempt to make a call to the web...
1
1541
by: Pim75 | last post by:
Hello, I've written a webservice that returns an array. The output of the webservice has to be consumed by a classic asp application. As classic asp can't read the returned array I want the webservice to return a xml document instead of the array. Can anyone tell me how I can output the array as a xml document?
3
2111
by: =?Utf-8?B?QkM=?= | last post by:
Hello, I just created a Hello World webservice in VB2005 (this is my first webservice ever). I ran it in debug mode and the page that came up said Hello World and said to change the webservice namespace from tempuri.org to something else so that the xml file could be created. I did that. Then it said to make a web reference (say what?) The only web reference I was able to make was to the local solution: Local Host. Then in the...
6
2990
by: Peter | last post by:
I have a WebService which returns a List of RunningReport class How do I read this XML data on the client side. How do I convert List<RunningReportfrom the WebService side to List<RunningReporton the client side I have tried the following: List<RunningReportreportList = null; localhost.ReportService localrs = new localhost.ReportService();
0
10564
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
10320
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
10308
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
10073
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
7609
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
6846
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
5513
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...
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
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.