Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting values from an XML File
Message
From
20/10/2006 06:25:08
 
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01162072
Message ID:
01163581
Views:
12
Thanks Viv!

That's the syntax I was looking for.

>>>>>Shouldn't that be:
>>>>>oxml.save("c:\program files\mist 2006\reports\mistrep.exe.config")
>>>>
>>>>Thanks! Good catch oh ye of the eagle eye!
>>>
>>>I get plenty of practice from looking at my own code! :-{
>>>Looks like it should work apart from that...
>>>Best,
>>>Viv
>>
>>Hi Viv,
>>
>>in this case I was mixing my code with code I got off the net. I tend to use "m.lo" and the code off the net used just plain "o".
>>
>>Do you see any way that I can try to get a particular node based on it's name, rather than using the hardcoded numbers I've used? I'm worried about the developer adding more stuff into the config file which might then break this code.
>
>Safer to use the element and attribute names. e.g:
>oMySettingsNode = oXML.documentElement.selectSingleNode("//MistRep.My.MySettings")
>MistReportFolderNode = oMySettingsNode.selectSingleNode("//*[@name='MistReportFolder']/value")
>MistReportFolderNode.Text = "Some newvalue"
>* or just:
>oMySettingsNode.selectSingleNode("//*[@name='MistReportFolder']/value").Text="Some new value"
>HTH,
>Viv
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform