I think that Pierre L. has the right idea of using AppleScript to read the data.
I played around with PHP to attempt to analyze the data. I'm learning XML. I didn't recognize the style of xml used by pages.
I'll have to study more up to see if the : has any special meaning.
<?xml version="1.0" ?>
<sl:document xmlns:sfa="http://developer.apple.com/namespaces/sfa"
xmlns:sf="http://developer.apple.com/namespaces/sf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:sl="http://developer.apple.com/namespaces/sl" sl:version="72007061400"
sfa:ID="SLPublicationModel-0"
sl:generator="slingshot" sl:app_build_date="Jan 22 2008, 01:09:42">
<sl:version-history>
<sl:number sfa:number="2004042200" sfa:type="i"/>
<sl:number sfa:number="2004060800" sfa:type="i"/>
<sl:number sfa:number="2004061600" sfa:type="i"/>
<sl:number sfa:number="2004062200"
sfa:type="i"/><sl:number sfa:number="2004062900"
sfa:type="i"/><sl:number sfa:number="2004072200"
sfa:type="i"/><sl:number sfa:number="2004091600"
sfa:type="i"/><sl:number sfa:number="2004093000"
sfa:type="i"/><sl:number sfa:number="2005091000"
sfa:type="i"/><sl:number sfa:number="2005091200"
sfa:type="i"/><sl:number sfa:number="2005140600"
sfa:type="i"/><sl:number sfa:number="72006110200"
sfa:type="q"/><sl:number sfa:number="72006110901"
sfa:type="q"/><sl:number sfa:number="72006111601"
sfa:type="q"/><sl:number sfa:number="72007010801"
sfa:type="q"/><sl:number sfa:number="72007012700"
sfa:type="q"/><sl:number sfa:number="72007061400"
sfa:type="q"/></sl:version-history>
<sl:publication-info>
<sl:SFWPCTShowDeletedTextProperty>
<sl:number sfa:number="1"
sfa:type="c"/></sl:SFWPCTShowDeletedTextProperty>
<sl:SLCreationLocaleProperty>
<sl:string sfa:string="pl_PL"/>
</sl:SLCreationLocaleProperty>
<sl:decimalTab>
<sl:string sfa:string="."/>
</sl:decimalTab>
<sl:kSFWPHyperlinksEnabledProperty>
.. massively clipped ...
I did look at PHP and I was able to understand it's xml extraction language. The PHP print statements stripped out the xml and left just the text.
I'll need to find out more about xml the next time I am at a llibrary.
I'll need to find a tidy program so to make the xml more readable.
I'll leave this be unless the applescript solution doesn't pan out.
I ran this php program from inside apache. I haven't figured out how to run php from the command line.
<html>
<head><title>Print XML</title></head>
<body>
<?php
// Implement multiple levels of debugging.
define('RUNsGREAT',0); // Normal level for production
define('MINIMUM',1);
define('MEDIUM',2);
define('MAXIMUM',3);
// Current level of debugging.
define('DEBUG',MAXIMUM);
define('BR',"<br>");
// Display one line of debug information.
function debug($displayLine)
{
if ( DEBUG >= MINIMUM )
{
echo $displayLine . BR;
}
}
function formatCommandOutput($myArray)
{
if ( DEBUG >= MEDIUM )
{
echo "\n" . BR . "in formatCommandOutput" .BR;
//var_dump($myArray);
//echo BR;
}
echo BR . "<tt>";
// Display everything that was returned
foreach ($myArray as $string)
{
echo BR . " " . htmlentities( $string );
}
echo BR . "</tt>";
return;
}
debug("Starting in " . __File__ );
// Invoke a Unix pwd command
$output = array();
$result = exec("pwd ", $output, $rc );
debug("rc= ".$rc);
formatCommandOutput($output);
$fileList = array();
$result =
exec("cat ".escapeshellarg("/Users/mac/Sites/createDoc/apparent.xml"), $fileList, $rc );
debug("rc= ".$rc);
//formatCommandOutput($fileList);
$oneList = implode("\n",$fileList);
echo "------------------------------------" . BR . BR ;
$xml = simplexml_load_string($oneList);
//$xml->asXML("bigDoc.xml");
print $xml->asXML();
?>
</body>
</html>