Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine if XML has tag?
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Determine if XML has tag?
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01573926
Message ID:
01573926
Vues:
55
Hi,

I am retrieving content of an XML into a cursor using the XMLTOCURSOR() function as follows:
create cursor c_test ( field1 c(20), field2 c(20), field3 n(5,0), field4 c(30), field5 c(1))
xmltocursor( 'MyXmlfile.xml', 'c_test', 512 + 8192 )
The XML has tags for fields field1, field2, field3. But may or may not have tags for field4 and field5. I know that xmltocursor() will work even if XML does not have these tags as the columns in the cursor will be empty. But it is possible that the tags in the XML are empty too. So checking if the columns field4 and/or field5 have entry does not tell me abut the XML. What I am trying to determine if the XML does or does not have the tags for columns field4 and field5. Is it possible just from the code above or I would have to open the XML field (using FILETOSTR() or some other way) before creating the cursor and importing the content of the xml into the cursor?

TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform