Re: xml text to record
Re: xml text to record
- Subject: Re: xml text to record
- From: Axel Luttgens <email@hidden>
- Date: Wed, 23 Nov 2011 10:19:30 +0100
Le 22 nov. 2011 à 21:11, Luther Fuller a écrit :
> I have tried more experimenting. Here's the script ...
>
> [...]
>
> It looks as if there is an xml element named "deviceList", but, there isn't.
> The only xml element I can get has no value, no name and no id.
> It is simply not possible to read any data from "xmlData".
>
> Perhaps someone with more experience with xml sees something that I don't.
> I am at a dead-end with this particular 'drutil' command.
Which version of Mac OS X is this? Looks like drutil's output is malformed, since it doesn't provide a name for the DOCTYPE.
So, for testing purposes, let's provide one:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE drutilinfo [
[...]
On the other hand, it seems that the XML Suite of System Events requires a real file as input (didn't remember of that one).
Not really a bug, yet possibly worth a feature request (so as to align with the capabilities of the Property List Suite).
Anyway, still for testing purposes, save the amended output of drutil in file "test.xml" on the Desktop and try:
tell application "System Events"
set xmlFile to XML file "~/Desktop/test.xml"
value of XML attribute "name" of XML element 1 of XML element 1 of xmlFile
--> "PIONEER DVD-RW DVR-K06"
end tell
Axel
_______________________________________________
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