473,856 Members | 1,769 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 1410
"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
5855
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
4637
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
6074
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
2195
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
4601
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
1701
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
1752
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
6144
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
3071
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
9916
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
9762
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
11056
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
10696
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
10782
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
10384
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
9531
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
7932
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
7093
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();...

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.