I have an Applescript that receive an XML string formatted as parameter, and I would like to read/parse data. Received string looks like:
<?xml version="1.0" encoding="utf-8" ?>
<win>
<name>Documents</name>
<target>SSD:Documents:</target>
<listview>1</listview>
<sidebar>0</sidebar>
<bounds>1200, 630, 1825, 1080</bounds>
</win>
I saw examples with XML files but I can't figure how to populate a record based upon received string. Final record could be like this:
set myRecord to {name:_XML_element_name_, tg:_XML_element_target_, listview: ...}
Or I could use at least some variables:
set theName to _XML_element_name_
set theTarget to _XML_element_target_
...