Re: XML to AppleScript Record
Re: XML to AppleScript Record
- Subject: Re: XML to AppleScript Record
- From: Emmanuel <email@hidden>
- Date: Mon, 3 Mar 2008 23:49:58 +0100
At 12:35 PM -0800 3/3/08, Stockly, Ed wrote:
FYI, I'm still using my pure AppleScript xml parser rather than the osax or
system events.
So, if what you want to do is use XML without a XML tool, then if you
are not against using any tool at all maybe you should try a minute
with a regular expression. For instance, far from perfect but maybe a
prod, here's what I get (I cheated, I pruned the white spaces out
first):
{ root:{ xmlDataFormat Version="1.1":{ dataTagFoo:{
dataTagBar:"Data"}, { dataTagMore:"MoreDataData"}, }, },
with:
set s to change "<([^/>]+)>" into "{ \\1:" in s with regexp
set s to change "<([^>]+)>" into "}, " in s with regexp
Emmanuel "I do some XML but don't tell my mother" Levy
Satimage-software, and now also Quomodo
_______________________________________________
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