MACSCRPT Archives

June 2007

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0 (Apple Message framework v752.2)
Content-Type:
text/plain; charset=ISO-8859-1; delsp=yes; format=flowed
Date:
Fri, 8 Jun 2007 14:13:10 +0200
Reply-To:
Macintosh Scripting Systems <[log in to unmask]>
Subject:
From:
Andreas Kiel <[log in to unmask]>
In-Reply-To:
<a05111b1fc28c74c05edd@[192.168.10.119]>
Content-Transfer-Encoding:
quoted-printable
Sender:
Macintosh Scripting Systems <[log in to unmask]>
Parts/Attachments:
text/plain (73 lines)
Hi all,

François from Satimage did help (out of the list).

set doc to XMLOpen alias "...ntsc2.xml"
set nl to ASCII character 10
set l to XMLRegexp (nl & "	+") in doc with all occurrences
repeat with x in l
	XMLSetText x to ""
end
XMLSave doc

seems to do the job.
Those people at Satimage are great.

Andreas

On 06.06.2007, at 16:36, Walter Ian Kaye wrote:

> At 11:13 a +0200 06/06/2007, Andreas Kiel didst inscribe upon an  
> electronic papyrus:
>
>> Content-Transfer-Encoding: 7bit
>> Content-Type: text/plain;
>> 	charset=US-ASCII;
>> 	delsp=yes;
>> 	format=flowed
>>
>> Hi all,
>>
>> I'm still (or better again) struggling a bit with XMLlib.
>> But that's really not the fault of the Satimage people, since the  
>> XMLs I've to work with don't follow the specs as they should - at  
>> least as far as I see.
>>
>> Maybe somebody got a tip for me how to handle the things below  
>> (I've attached a file, if that works with the list).
>
> It does not. :)
>
>> If I check values using XMLGetText I will get ascii character 13  
>> plus  whatever number of tabs if the value is empty - since the  
>> XML uses  ascii 13 for new line and tabs for indent.
>> If I modify a value and save the XML all "empty" values will be  
>> nailed to: ascii character 13 plus whatever number of tabs. And so  
>> the XML is useless to bring it back to the original application.
>>
>> Any way to modify the XML upfront in a fast way so that this  
>> won't  happen?
>> If there would be a fast way to remove the indents first and then  
>> remove all values which are exactly ascii 13 that would be the  
>> most convient.
>
> I'm sure a Perl script could fix the file. Maybe something like this:
>
> s/(<([A-Za-z0-9:]+)>)(\015\009+)/\1<\/\2>\3/g;
>
> ...but that is off the top of my very tired brain and is probably  
> wrong. :)
>
>
> -boo

Andreas Kiel
Spherico
Nelkenstr. 25
D-76135 Karlsruhe
Tel.: +49 (0)721 183 9753
eFax: +1 650 897 8094

eMail: [log in to unmask]
http://spherico.com/filmtools -- workflow tools for FCP

ATOM RSS1 RSS2