473,624 Members | 2,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

reading xml returned on http

Hello,

I am working on a client project and they have a connection to a catalog
system that passes data back and forth as xml over http

The format of the data is as follow(s)
<?xml version="1.0"?>

<customer-redemption>
<partner-client>USA</partner-client>
<partner-client-participant-id>
<user-name>69</user-name>
<password>xxxxx xxxxx</password>
<user-handle>dko</user-handle>
</partner-client-participant-id>
<redemption>
<order-number>410416</order-number>
<ship-to>
<first-name>ERT</first-name>
<middle-name></middle-name>
<last-name>KO</last-name>
<address-line-1>station
dental</address-line-1>
<address-line-2>167 road 24 ste.
6</address-line-2>
<city>bobs your uncle</city>
<state-code>TX</state-code>
<postal-code>99999</postal-code>
<postal-code-ext></postal-code-ext>
<country-code>USA</country-code>
</ship-to>
<total-points-spent>18182</total-points-spent>
<date-time>2006-03-17 09:54:05.0</date-time>
<item-redeemed>
<item-number>203089</item-number>
<item-description>Pro Line Golf Ball
Retriever</item-description>
<qty>1</qty>
<price>18182. 0</price>
<line-number>1</line-number>
</item-redeemed>
</redemption>
</customer-redemption>


I have worked on projects where you call a webservice and that returns xml
back to a calling page, but this is not a webservice and I was wondering if
any one had any experience with reading xml over http request, where
apparently this returned as a web page. If you could reply to this post I
would really appreciate it. Thanks.

--
J. D.
Mar 18 '06 #1
4 1402
"J.D." <jd****@dalys.u s> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I am working on a client project and they have a connection to a catalog
system that passes data back and forth as xml over http

The format of the data is as follow(s)
<?xml version="1.0"?>

<customer-redemption>
<partner-client>USA</partner-client>
<partner-client-participant-id>
<user-name>69</user-name>
<password>xxxxx xxxxx</password>
<user-handle>dko</user-handle>
</partner-client-participant-id>
<redemption>
<order-number>410416</order-number>
<ship-to>
<first-name>ERT</first-name>
<middle-name></middle-name>
<last-name>KO</last-name>
<address-line-1>station
dental</address-line-1>
<address-line-2>167 road 24 ste.
6</address-line-2>
<city>bobs your uncle</city>
<state-code>TX</state-code>
<postal-code>99999</postal-code>
<postal-code-ext></postal-code-ext>
<country-code>USA</country-code>
</ship-to>
<total-points-spent>18182</total-points-spent>
<date-time>2006-03-17 09:54:05.0</date-time>
<item-redeemed>
<item-number>203089</item-number>
<item-description>Pro Line Golf Ball
Retriever</item-description>
<qty>1</qty>
<price>18182. 0</price>
<line-number>1</line-number>
</item-redeemed>
</redemption>
</customer-redemption>
I have worked on projects where you call a webservice and that returns xml
back to a calling page, but this is not a webservice and I was wondering

if any one had any experience with reading xml over http request, where
apparently this returned as a web page. If you could reply to this post I
would really appreciate it. Thanks.

What do you want to do with the XML data?

Do you know about XSLT?

http://xmlxslt.sourceforge.net/
http://www.brics.dk/~amoeller/XML/xslt.html

Here's an indented listing for readability:

<?xml version="1.0"?>
<customer-redemption>
<partner-client>USA</partner-client>
<partner-client-participant-id>
<user-name>69</user-name>
<password>xxxxx xxxxx</password>
<user-handle>dko</user-handle>
</partner-client-participant-id>
<redemption>
<order-number>410416</order-number>
<ship-to>
<first-name>ERT</first-name>
<middle-name></middle-name>
<last-name>KO</last-name>
<address-line-1>station dental</address-line-1>
<address-line-2>167 road 24 ste. 6</address-line-2>
<city>bobs your uncle</city>
<state-code>TX</state-code>
<postal-code>99999</postal-code>
<postal-code-ext></postal-code-ext>
<country-code>USA</country-code>
</ship-to>
<total-points-spent>18182</total-points-spent>
<date-time>2006-03-17 09:54:05.0</date-time>
<item-redeemed>
<item-number>203089</item-number>
<item-description>Pro Line Golf Ball Retriever</item-description>
<qty>1</qty>
<price>18182. 0</price>
<line-number>1</line-number>
</item-redeemed>
</redemption>
</customer-redemption>
Mar 18 '06 #2
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:y7******** *************** *******@comcast .com...
"J.D." <jd****@dalys.u s> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I am working on a client project and they have a connection to a catalog
system that passes data back and forth as xml over http [snip] I have worked on projects where you call a webservice and that returns xml back to a calling page, but this is not a webservice and I was wondering

if
any one had any experience with reading xml over http request, where
apparently this returned as a web page. If you could reply to this post I would really appreciate it. Thanks.

[snip]

Perhaps this link will help:
http://www.w3schools.com/dom/dom_examples.asp
Mar 18 '06 #3
> "J.D." <jd****@dalys.u s> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I am working on a client project and they have a connection to a catalog
system that passes data back and forth as xml over http [snip] I have worked on projects where you call a webservice and that returns xml back to a calling page, but this is not a webservice and I was wondering if
any one had any experience with reading xml over http request, where
apparently this returned as a web page. If you could reply to this post I would really appreciate it. Thanks.

[snip]

Here's another link:
http://www.webpasties.com/xmlHttpRequest/
Guide to Using AJAX and XMLHttpRequest from WebPasties
Also, there was an error in both of our listings:
Here's an indented listing for readability:

<?xml version="1.0"?>


There needs to be a space before "?>" in the above line; as in:
<?xml version="1.0" ?>
Mar 18 '06 #4
Thanks for the examples down below, but what I was looking for was passing
xml between two servers.
but your links were helpful.
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:y7******** *************** *******@comcast .com...
"J.D." <jd****@dalys.u s> wrote in message
news:ul******** ******@TK2MSFTN GP11.phx.gbl...
Hello,

I am working on a client project and they have a connection to a catalog
system that passes data back and forth as xml over http

The format of the data is as follow(s)
> <?xml version="1.0"?>
>
> <customer-redemption>
> <partner-client>USA</partner-client>
> <partner-client-participant-id>
> <user-name>69</user-name>
> <password>xxxxx xxxxx</password>
> <user-handle>dko</user-handle>
> </partner-client-participant-id>
> <redemption>
> <order-number>410416</order-number>
> <ship-to>
> <first-name>ERT</first-name>
> <middle-name></middle-name>
> <last-name>KO</last-name>
> <address-line-1>station
> dental</address-line-1>
> <address-line-2>167 road 24 ste.
> 6</address-line-2>
> <city>bobs your uncle</city>
> <state-code>TX</state-code>
> <postal-code>99999</postal-code>
> <postal-code-ext></postal-code-ext>
> <country-code>USA</country-code>
> </ship-to>
> <total-points-spent>18182</total-points-spent>
> <date-time>2006-03-17 09:54:05.0</date-time>
> <item-redeemed>
> <item-number>203089</item-number>
> <item-description>Pro Line Golf Ball
> Retriever</item-description>
> <qty>1</qty>
> <price>18182. 0</price>
> <line-number>1</line-number>
> </item-redeemed>
> </redemption>
> </customer-redemption>


I have worked on projects where you call a webservice and that returns
xml
back to a calling page, but this is not a webservice and I was wondering

if
any one had any experience with reading xml over http request, where
apparently this returned as a web page. If you could reply to this post I
would really appreciate it. Thanks.

What do you want to do with the XML data?

Do you know about XSLT?

http://xmlxslt.sourceforge.net/
http://www.brics.dk/~amoeller/XML/xslt.html

Here's an indented listing for readability:

<?xml version="1.0"?>
<customer-redemption>
<partner-client>USA</partner-client>
<partner-client-participant-id>
<user-name>69</user-name>
<password>xxxxx xxxxx</password>
<user-handle>dko</user-handle>
</partner-client-participant-id>
<redemption>
<order-number>410416</order-number>
<ship-to>
<first-name>ERT</first-name>
<middle-name></middle-name>
<last-name>KO</last-name>
<address-line-1>station dental</address-line-1>
<address-line-2>167 road 24 ste. 6</address-line-2>
<city>bobs your uncle</city>
<state-code>TX</state-code>
<postal-code>99999</postal-code>
<postal-code-ext></postal-code-ext>
<country-code>USA</country-code>
</ship-to>
<total-points-spent>18182</total-points-spent>
<date-time>2006-03-17 09:54:05.0</date-time>
<item-redeemed>
<item-number>203089</item-number>
<item-description>Pro Line Golf Ball Retriever</item-description>
<qty>1</qty>
<price>18182. 0</price>
<line-number>1</line-number>
</item-redeemed>
</redemption>
</customer-redemption>

Mar 18 '06 #5

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

Similar topics

0
5841
by: Bernhard Kuemel | last post by:
Hi! I want to read/write commands and program input to/from /bin/bash several times before I close the stdin pipe. However, reading from cat hangs unless I first close the stdin pipe. <?php $descriptorspec = array( 0 => array("pipe", "r"), // stdin is a pipe that the child
40
4506
by: googler | last post by:
I'm trying to read from an input text file and print it out. I can do this by reading each character, but I want to implement it in a more efficient way. So I thought my program should read one line at a time and print it out. How can I do this? I wrote the code below but it's not correct since the fscanf reads one word (terminating in whitespace or newline) at a time, instead of reading the whole line. #include <stdio.h> void...
7
6054
by: John Dann | last post by:
I'm trying to read some binary data from a file created by another program. I know the binary file format but can't change or control the format. The binary data is organised such that it should populate a series of structures of specified variable composition. I have the structures created OK, but actually reading the files is giving me an error. Can I ask a simple question to start with: I'm trying to read the file using the...
5
2186
by: Ian Meakin | last post by:
I am trying to consume a web service i have written. The web service returns to the client an array of objects. The web service when tested via inetrnet explorer retruns the correct xml data. I just dont understand how in my client application to read the xml returned back. How do i capture the xml stream and then read it to use on the client? -------------------------------- Copy of some xml outputted by the web service when...
30
4569
by: siliconwafer | last post by:
Hi All, I want to know tht how can one Stop reading a file in C (e.g a Hex file)with no 'EOF'?
1
1690
by: Matthew | last post by:
Using .NET 1.1 I trying to consume a web service that returns an integer and an array of type string which I declare and use line this Dim Results() As String Me.txtMain.Text = consumeWebService.GetPublishedDatabases("1.0", Results).ToString The problem is that the array "Results" is always 'Nothing' - that is it never gets filled with the value being returned. In looking at the SOAP traffic with SOAPscope the service is returning...
4
1743
by: Ivan Voras | last post by:
I have a simple network protocol client (it's a part of this: http://sqlcached.sourceforge.net) implemented in Python, PHP and C. Everything's fine, except that the Python implementation is the slowest - up to 30% slower than the PHP version (which implements exactly the same logic, in a class). In typical usage (also in the benchmark), an object is created and ..query is called repeatedly. Typical numbers for the benchmark are: For...
3
6132
by: Pim75 | last post by:
Hello, I've written a simple asp code that has to read an xml file from an Asp.net webservice. The code looks like: set soapclient = Server.CreateObject("MSSOAP.SoapClient30") soapclient.ClientProperty("ServerHTTPRequest") = True soapclient.mssoapinit("http://webservice/Webservice.asmx?WSDL") soapclient.ConnectorProperty("Timeout") = 120000
7
3057
by: random guy | last post by:
Hi, I'm writing a program which creates an index of text files. For each file it processes, the program records the start and end positions (as returned by tellg()) of sections of interest, and then some time later uses these positions to read the interesting sections from the file.
0
8179
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,...
1
8348
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
7176
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...
1
6112
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
5570
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
4084
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
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
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
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.