Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 17th, 2005, 11:22 AM
Registered User
 
Join Date: Apr 2005
Location: Hengelo, Overijssel, Netherlands.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default store values of recieved xml

Hi,

I hope someone can help me with this:
I am sending a xml file in asp to someone and recieve an answer.
Ok that works fine, but now i have to store the results to a
database. ASP is no problem but i don't have much experience with xml, so help is verry much appreciated!!
I only have to store the download name and link for that itemid and customerid

Thanks in advance!!

What i have now is:

<HTML>
<HEAD>
</HEAD>
<body>

<%

'Put together some XML to post off
xmlString = "<?xml version=""1.0""?>" & vbcrlf
xmlString = xmlString & " <order idorder='9999'>" & vbcrlf
xmlString = xmlString & " <username>Name</username>" & vbcrlf
xmlString = xmlString & " <password>123456</password>" & vbcrlf
xmlString = xmlString & " <email>4lx@gmx.de</email>" & vbcrlf
xmlString = xmlString & " <userip>84.44.148.235</userip>" & vbcrlf
xmlString = xmlString & " <proxyip>84.44.148.235</proxyip>" & vbcrlf
xmlString = xmlString & " <hostname>blank</hostname>" & vbcrlf
xmlString = xmlString & " <country>777</country>" & vbcrlf

xmlString = xmlString & " <product id='5236'> " & vbcrlf
xmlString = xmlString & " <name> Album</name>" & vbcrlf
xmlString = xmlString & " <quantity>1</quantity>" & vbcrlf
xmlString = xmlString & " <price_unit>0.70</price_unit>" & vbcrlf
xmlString = xmlString & " <price_sum>0.70</price_sum>" & vbcrlf
xmlString = xmlString & " </product>" & vbcrlf

xmlString = xmlString & " <product id='5238'> " & vbcrlf
xmlString = xmlString & " <name> Album</name>" & vbcrlf
xmlString = xmlString & " <quantity>1</quantity>" & vbcrlf
xmlString = xmlString & " <price_unit>0.70</price_unit>" & vbcrlf
xmlString = xmlString & " <price_sum>0.70</price_sum>" & vbcrlf
xmlString = xmlString & " </product>" & vbcrlf

xmlString = xmlString & " </order>"

'Load the XML into an XMLDOM object
Set SendDoc = server.createobject("Microsoft.XMLDOM")
SendDoc.ValidateOnParse= True
SendDoc.LoadXML(xmlString)

'Set the URL of the receiver
sURL = "http://www.test.com/testxml/Receive.asp"

'Call the XML Send function (defined below)
set NewDoc = xmlSend (sURL, SendDoc)'xmlString)
'We receive back another XML DOM object!


private function xmlsend(url, docSubmit)
Set poster = Server.CreateObject("MSXML2.ServerXMLHTTP")
poster.open "POST", url, false
poster.setRequestHeader "CONTENT_TYPE", "text/xml"
poster.send docSubmit
Set NewDoc = server.createobject("Microsoft.XMLDOM")
newDoc.ValidateOnParse= True
newDoc.LoadXML(poster.responseTEXT)

Set XMLSend = NewDoc
Set poster = Nothing
end function

%>

</body>
</HTML>


The ruturned xml look like this:


- <test name="ORDER IO">
- <order>
<orderid>46</orderid>
<shopid>1064</shopid>
<customerid>5586</customerid>
<username>name</username>
<password>e8636ea013e682faf61f56ce1cb1ab5c</password>
<email>test@gmx.de</email>
<userip>84.44.148.235</userip>
<proxyip>84.44.148.235</proxyip>
<hostname>xdsl-84-44-148-235.netcologne.de</hostname>
<country>875</country>
<isp>netcologne.de</isp>
- <product id="5236">
<id>5236</id>
<name>album</name>
<article_no>MMR 016-x02</article_no>
<quantity>1</quantity>
<price_selling>0.70</price_selling>
<price_sum>0.7</price_sum>
<download name="album">http://down.test.net:8080/? media=390f1bf71b243843a4f20deafae8261f</download>
</product>
- <product id="5237">
<id>5237</id>
<name>test2</name>
<article_no>MMR 016-x01</article_no>
<quantity>2</quantity>
<price_selling>0.70</price_selling>
<price_sum>1.4</price_sum>
<download name="Album">http://down.test.net:8080/?media=015d8080b3b27f7a60effe51cee706d7</download>
</product>
- <product id="4231">
<id>4231</id>
<name>album 3</name>
<article_no>moh_big_001-x</article_no>
<quantity>1</quantity>
<price_selling>7.00</price_selling>
<price_sum>7</price_sum>
<download name="album 3">http://down.test.net:8080/?media=bcdae67960419625e72f6e27c0ca8b89</download>
</product>
<price_total type="net" currency="#128;" currencytext="EURO">9.1</price_total>
<stats datetime="2005-04-16 01:06:15" exectime="0.62606883049" testing="1" />
</order>
</test>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to store "SET" values to Vector ? msg2ajay JSP Basics 1 September 4th, 2007 06:45 AM
DTS Package, XML task. Read XML file and store it Victoria SQL Server DTS 0 July 24th, 2006 02:43 PM
Store Array of Form Values lbunnell Beginning PHP 1 June 21st, 2005 10:13 AM
To split values and store in the database lily611 SQL Server 2000 3 July 15th, 2004 09:01 AM
store multiple values in a string bamboat_3 General .NET 3 May 23rd, 2004 07:32 AM



All times are GMT -4. The time now is 02:57 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.