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 16:31:06 +0100
Le 23 nov. 2011 à 16:10, Luther Fuller a écrit :
> Axel Luttgens wrote ... to which I reply, Thanks!
>
> I just did some experimenting with ...
>
> do shell script "drutil discinfo -xml"
>
> and found no problems at all. But, ...
>
> do shell script "drutil list -xml" -- bad???
>
> still has a problem. There must be an error in the data format returned by this.
> Perhaps I can avoid using 'drutil list'.
>
> This leaves a question hanging: What's the problem with 'drutil list -xml'?
The output of "drutil list -xml" doesn't provide a name for the DOCTYPE:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE [
<!ELEMENT deviceList (device)*>
[...]
and System Events seems to catch the fact that the xml text is malformed.
It should be possible to circumvent that drutil bug by adding a name before feeding "make new XML data...":
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE listdoc [
<!ELEMENT deviceList (device)*>
[...]
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