• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
xml text to record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xml text to record


  • Subject: xml text to record
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 21 Nov 2011 11:48:10 -0600

A couple of months ago, we had this conversation:

On Sep 19, 2011, at 5:06 PM, Stan Cleveland wrote:

On Sep 15, 2011, at 1:27 PM, Luther Fuller wrote:

On Sep 15, 2011, at 11:12 AM, Luther Fuller wrote:

Somewhere, I have a script that uses the -plist option to create a record via System Events. Reading the record is obviously easy. Would the -xml option for 'system_profiler' work the same way? I don't know. When I find my script, I will let you know.

I found the script and annotated it ...
<snip>
 Try it with the 'system_profiler' command with the -xml option. It may not work. I don't know.

Hi Luther,

Nice. It does work with 'system_profiler' data! So that's a fast and easy option for Jeffrey to parse the system hardware data.

I have verified that this script works ...

quoted form of (POSIX path of testImage)
do shell script "hdiutil imageinfo -plist " & the result
set response to the result -- text in xml format
tell application "System Events"
set infoRecord to value of (make property list item with properties {text:response})
end tell

I needed to get infoRecord for a command that had the -xml option, but not the -plist option, so I tried ...

do shell script "drutil info -xml"
set response to the result -- text in xml format
tell application "System Events"
set infoRecord to value of (make property list item with properties {text:response})
end tell

but, I get an error in the last line.

If I log the raw text, I can see the difference in the response, but I can't see how to make a record form the xml text. 'system_profiler' must be an exception. Or there's something more I need to understand.

Anyone see what my problem is?

 _______________________________________________
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

  • Follow-Ups:
    • Re: xml text to record
      • From: Luther Fuller <email@hidden>
    • Re: xml text to record
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: update search base in outlook 2011
  • Next by Date: Finder "Hide Others"
  • Previous by thread: Folder Actions Scripts
  • Next by thread: Re: xml text to record
  • Index(es):
    • Date
    • Thread