Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting values from an XML File
Message
De
18/10/2006 15:13:43
 
 
À
18/10/2006 14:02:58
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01162072
Message ID:
01163071
Vues:
12
Hi Tracy,

thanks, I had been looking at that link, but I'm still having difficulties.

I have managed to get at the nodes I need (but again I'm not happy with the method I am using) and change the textof the node, but when I save it, the changed text does not save. Here's my code (you can find the XML further up in this thread), hopefully someone can help me work out a better way to do this:
oxml = CREATEOBJECT('Microsoft.XMLDOM')
oXML.async = .f.
oXML.load("c:\program files\mist 2006\reports\mistrep.exe.config")

loRows = oXML.DocumentElement.ChildNodes(3).ChildNodes
*!*	loRows = oXML.SelectNodes("applicationSettings")

FOR EACH loRow IN loRows
   ?loRow.ChildNodes(0).text
   loRow.ChildNodes(1).text = "test"
   ?loRow.ChildNodes(1).text
   ?loRow.ChildNodes(2).text
   ?loRow.ChildNodes(3).text

   ? "---------"
ENDFOR
m.loxml.save("c:\program files\mist 2006\reports\mistrep.exe.config")
RETURN 
>Look at xmldom near the bottom of Rick's article:
>
>http://www.west-wind.com/presentations/XMLMessaging/xmlmessaging.htm
>
>>Thanks Sergey, will check it out. I've got it working using ALINES() and STRTOFILE() but think the code will break too easily if the XML structure is changed.
>>
>>>After reviwing your XML, I don't think it can be done with XmlAdapter. Look at using XMLDOM or other means.
>>>
>>>>Thanks Sergey, I got the tool mentioned, but can't figure out how it works. :(
>>>>
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform