Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XML file problem



XMLlib
http://www.satimage.fr/software/en/downloads_osaxen_pop.html

There is an examples folder which will help you through this, although if you have any problems after you load it, just ask here, there's plenty of people to help you out on this list ;) 

Wayne


On 17. feb. 2007, at 18.10, Jasper Van Proeyen wrote:

Hi list,

I have an XML file with the following structure:

<?xml version="1.0" encoding="iso-8859-1" ?>
<myxml>
<child>
<data1><![CDATA[xxxx]]</data1>
<data2>yyyy</data2>
<data3>zzzz</data3>
</child>
</myxml>

Given that the XML file is generated online: can I just use the following line to store the complete contents of the XML file in a variable and somehow still access the "xxxx", "yyyy" and "zzzz" strings?
set theXML to do shell script "curl --silent 'http://myserver.com/generatexml.php" (output of the URL is an XML file)

If so, how can I store the 3 string values into an array (or 3 seperate values - it doesn't matter actually)?
If not, what's the best way to access these strings then?

I've tried via "System Events", but that didn't work:
set valueY to value of XML element "data2" of XML elements of XML element "child" of XML element "myxml" of XML element 1 of contents of theXML (gives a very strange "Can't make \"myxml\" into type integer" error)

Any help would be appreciated.

Regards,
Jasper.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >XML file problem (From: Jasper Van Proeyen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.