|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
||||
|
||||
|
Ok - so whats the question?
|
|
#3
|
|||
|
|||
|
Yeah sorry jpenn I hit tab a couple of times and posted to early :P Its been edited now
|
|
#4
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML newbie problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|