XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old May 22nd, 2003, 12:09 AM
Fracture Fracture is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 Fracture User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML newbie problem

Hi there,

Ive just started using xml and am trying to use it with ASP (which Ive been doing for a while)

Basically I'm doing a real basic login which grabs info out of an XML page which looks like this:

<customers>
<Customer id="1">
<username>mike</username>
<pwd>hargy</pwd>
<country>NZL</country>
</Customer>
<Customer id="2">
<username>nick</username>
<pwd>shaw</pwd>
<country>NZL</country>
</Customer>
</Customers>


I use this line to find out if the username and pwd exist

Set objNode = objXML.selectSingleNode("//Customer[username='"&gvstrUserName&"'][pwd='"&gvstrPWD&"']")

which works fine

I then want to pull the country tag text out for that node but cant seem to do it. Any ideas?

Cheers
Fracture

Last edited by Fracture : May 22nd, 2003 at 12:14 AM.

Reply With Quote
  #2  
Old May 22nd, 2003, 12:11 AM
jpenn's Avatar
jpenn jpenn is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Jun 2002
Location: Washington, DC
Posts: 2,693 jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level)jpenn User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 41 m 10 sec
Reputation Power: 16
Ok - so whats the question?

Reply With Quote
  #3  
Old May 22nd, 2003, 12:15 AM
Fracture Fracture is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 Fracture User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Yeah sorry jpenn I hit tab a couple of times and posted to early :P Its been edited now

Reply With Quote
  #4  
Old May 22nd, 2003, 07:01 PM
Fracture Fracture is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 3 Fracture User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK ive worked it out. for anyone else with this problem you write it like this

If Not objNode Is Nothing Then'if exists return true to Flash file ("flashfile.swf")
gvstrCountry = objNode.selectSingleNode("country").text

response.write "LoggedIn=true&country=" & gvstrCountry


Cheers
Fracture

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML newbie problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway