SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : XML Technologies :

Previous DiscussionNext Discussion
 selectNodes issue/question

Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME | LNAME")

is this proper syntax? I'm trying to grab both "FNAME" and "LNAME" nodes and combine them into one value with no space in between. Make sense?

thanks for ANY help!

Started By danthewebguy on Aug 10, 2005 at 12:24:36 PM

24 Response(s) | Reply

Earlier Replies | Replies 4 to 10 of 24 | Later Replies
Goto Page: 4 3 2 1
danthewebguy on Aug 11, 2005 at 7:45:16 AM (# 4)

hmmm - here's my code:
###################################################
Dim objXMLDoc, NodeList, Node, s

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml")
objXMLDoc.setProperty "SelectionLanguage", "XPath"

Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")

s = ""
For Each Node In NodeList
s = s & Node.text
Next


If s = sSourcePage Then
response.write "You are a user!"
Else
response.write "You are NOT a user!"
End If
###################################################

Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)

I really appreciate your input and quick responses - who sent you? :)


danthewebguy on Aug 11, 2005 at 7:45:57 AM (# 5)

hmmm - here's my code:
###################################################
Dim objXMLDoc, NodeList, Node, s

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml")
objXMLDoc.setProperty "SelectionLanguage", "XPath"

Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")

s = ""
For Each Node In NodeList
s = s & Node.text
Next


If s = sSourcePage Then
response.write "You are a user!"
Else
response.write "You are NOT a user!"
End If
###################################################

Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)

I really appreciate your input and quick responses - who sent you? :)


danthewebguy on Aug 11, 2005 at 7:46:45 AM (# 6)

hmmm - here's my code:
###################################################
Dim objXMLDoc, NodeList, Node, s

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml")
objXMLDoc.setProperty "SelectionLanguage", "XPath"

Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")

s = ""
For Each Node In NodeList
s = s & Node.text
Next


If s = sSourcePage Then
response.write "You are a user!"
Else
response.write "You are NOT a user!"
End If
###################################################

Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)

I really appreciate your input and quick responses - who sent you? :)


danthewebguy on Aug 11, 2005 at 7:47:41 AM (# 7)

hmmm - here's my code:
###################################################
Dim objXMLDoc, NodeList, Node, s

Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("e:\webroot\ideawwwroot\security\marketinglist.xml")
objXMLDoc.setProperty "SelectionLanguage", "XPath"

Set NodeList = objXMLDoc.selectNodes("/MarketingList/TargetClient/FNAME|/MarketingList/TargetClient/LNAME")

s = ""
For Each Node In NodeList
s = s & Node.text
Next


If s = sSourcePage Then
response.write "You are a user!"
Else
response.write "You are NOT a user!"
End If
###################################################

Now, "sSourcePage" is a variable that I set after trimming the URL - so, for instance, sSourcePage may be "JohnDoe" after someone types in http://www.company.com/johndoe. So, if I say "If s = sSourcePage do this" it should do what I tell it to, right? But that's not working . . . am I missing something? Is it not that easy? :)

I really appreciate your input and quick responses - who sent you? :)


bod1467 on Aug 11, 2005 at 7:48:07 AM (# 8)
This message has been edited.

Cut -- I hadn't finished reading the thread.


danthewebguy on Aug 11, 2005 at 7:48:26 AM (# 9)

geez! I kept getting DB errors when posting this response - sorry about that!


danthewebguy on Aug 11, 2005 at 7:58:40 AM (# 10)

wait a minute - I did a response.write on the "s" variable before the "for each Node" statement and it was equal to nothing - blank - dead air. But after I do the "For each node . . . " "S" is equal to ALL of the fnames and lnames in my xml file, like one long string of names . . . I'm totally baffled now, of course "s" isn't equal to just one name . . . . :(


Earlier Replies | Replies 4 to 10 of 24 | Later Replies
Goto Page: 4 3 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.