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