Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parsing XML with DOM
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 7
Divers
Thread ID:
00962465
Message ID:
00964135
Vues:
8
Well Martin, I truly thought we had this finished but now there is another problem. I cannot seem to get at the child nodes of the elements. If
loPrograms = loXML.documentElement.selectNodes("*/*/*/*/*/*[local-name()='programs']/*[local-name()='program']")
oProgram = loPrograms.nextNode
? oProgram.xml
? oProgram.firstChild.nodeName
? oProgram.childNodes(0).text &&
produces
<program xmlns="urn:TMSWebServices" id="EP1305240021">
        <title>The Crocodile Hunter</title>
        <subtitle>Where Devils Run Wild</subtitle>
        <description>Steve and Terri seek the Tasmanian tiger, thought to be extinct since the
	1930s; Tasmanian devils; copperhead snakes; black-face shaggs; Paddy Mellon joeys;
	wombats.</description>
        <showType>Series</showType>
        <series>SH130524</series>
        <originalAirDate>1998-06-22</originalAirDate>
</program>
title
The Crocodile Hunter
but
? oProgram.selectSingleNode("title").text
produces an error
"Member SELECTSINGLENODE does not evaluate to an object."
how do you extract a specific node such as "title?" I have tried every combination of the various calls that I can think of and none seem to work. The problem code worked fine in my sample data but errors out when applied to the full file.

What gives?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform