Re: Xcode-users Digest, Vol 2, Issue 224
Re: Xcode-users Digest, Vol 2, Issue 224
- Subject: Re: Xcode-users Digest, Vol 2, Issue 224
- From: Robert Frank <email@hidden>
- Date: Thu, 26 May 2005 16:37:58 +0200
If it's just for the two strings (CFBundleShortVersionString and
ProjectName ??), then how about a simple perl script?
#!/usr/bin/perl
use strict;
my $file = shift;
open(PLIST, $file) || die "Could not open $file\n";
my $getArg = undef;
my $lastArg;
map {
if ($getArg) {
chomp();
s/.*<string>//;
s/<\/string>.*//;
print "$getArg = $_\n";
}
$getArg = ($_ =~ /.*CFBundleShortVersionString.*/)?'version':($_ =~
/.*ProjectName.*/)?'Category':undef;
$lastArg = $1;
} <PLIST>;
exit(0);
Save the above to a file, make it executable, run it with the name of
the plist file as only argument.
Robert
On 26 May 2005, at 15:34, email@hidden wrote:
Hello -
Looks like every application I install has a file called Info.plist
Its an XML file about the program. Does anyone know if there is
already an
XML parser I can use out there to parse this file or do I have to
write my
own XML parser?
I just need to read the product name and version from this file.
Departement Informatik FGB tel +41 (0)61 267 14 66
Universität Basel fax. +41 (0)61 267 14 61
Robert Frank
Klingelbergstrasse 50 email@hidden
CH-4056 Basel
Switzerland
http://www.informatik.unibas.ch/personen/frank_r.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden