Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting the presence of a node
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00935769
Message ID:
00936114
Vues:
29
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform