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 - System Events vs XMLlib



"Ed Stockly" wrote:

> Wayne, If that's all you want, and it's not unusual to want to pull just one
> or two values from an xml file, here's a quick way to do it.
> 
> set text item delimiters to "<key>creation</key>" set creationDate to text
> item 2 of myText
> set text item delimiters to "<string>"

This is exactly the wrong way to approach XML and XML-like structured
documents.  That's why they're structured.

Sure, this kind of scripting can get the data, but it's a lot of clutter for
no benefit.  It's too specific to be a useful suggestion for any real
scripting of XML extraction.  (In my view, that is.)

Also, I'm not sure I get any actual questions in Wayne's posts.  Wayne, you
say you were "only trying to force a discussion".  Why? What's the beef?

There are any number of ways to deal with XML, but known and unknown
structured documents.  OSAX are a part of AppleScript and there are known
ways to included them without an additional installation (as has been
demonstrated here, re: bundles.)

You have the built-in Plist Suite and you have the stuff from
Satimage...both are useful and easily implemented.

It seems like there's a lot of chatter about nothing going on in this
thread.

<shrug>

-- 
Gary

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

This email sent to email@hidden

References: 
 >Re: XML - System Events vs XMLlib (From: Ed Stockly <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.