Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the presence of a node
Message
 
To
24/08/2004 11:05:22
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00935769
Message ID:
00936114
Views:
28
This message has been marked as the solution to the initial question of the thread.
I'm sorry,
LOCAL loXML,loNodes,lcXML

lcXML=[<?xml version="1.0" encoding="windows-1250" standalone="yes"?>]+;
      [<rss><channel><lastBuildDate>xx</lastBuildDate></channel></rss>]

loXML=CREATEOBJECT("Microsoft.XMLDOM")
loXML.Async = .F.
IF !loXML.LoadXML(lcXML) && pokud se nepodaøilo nahrát soubor
   RETURN && vypadni ven
ENDIF

loXML.SetProperty("SelectionLanguage","XPath")

loNodes=loXML.documentElement.selectNodes('channel/lastBuildDate')
?loNodes.Length

loNodes=loXML.selectNodes('rss/channel/lastBuildDate')
?loNodes.Length
MartinJ

>>Try...
>>
>>*loXML.SetProperty("SelectionLanguage","XPath")
>>loNode=loXML.documentElement.selectNodes('rss/channel/lastBuildDate')
>>IF loNodes.Length=0
>>   * Node not exist
>>ENDIF
>>
>
>This generates an error in the IF command as loNodes does not exist. If I replace that with loNode, it returns 0.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform