Re: XML to AppleScript Record
Re: XML to AppleScript Record
- Subject: Re: XML to AppleScript Record
- From: Christopher Nebel <email@hidden>
- Date: Mon, 3 Mar 2008 12:07:54 -0800
On Mar 3, 2008, at 11:24 AM, Stockly, Ed wrote:
Before I go about reinventing the wheel, I have a question for the
list.
Has anyone tried converting XML data to an appleScript record, using
the xml
tags as record labels.
In other words,
<root>
<xmlDataFormat Version="1.1">
<dataTagFoo>
<dataTagBar>
"Data"
</dataTagBar>
<dataTagMore>
"More Data Data"
</dataTagMore>
</dataTagFoo>
</root>
Should translate as:
{root:{{xmlDataFormat:{version:"1.1:"}}, {dataTagFoo:
{dataTagBar:"Data"}},
{dataTagMore:"More Data Data"}}}
I couldn't see how to do this with any of the XML osax or system
events. Am
I missing something?
Aside from the fact that such a transformation isn't possible on a lot
of XML? Anything where the tags aren't unique, to be precise? Not to
mention the whole records-aren't-really-associative-arrays-stop-trying-
to-use-them-like-they-are argument. System Events and the various XML
osaxen will let you manipulate the XML, is there a reason you
specifically wanted a record?
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden