                
<?php

//-- Description: 
//--   This function extracts the category paths as an array from the 
//--   category-data.xml file
function fnRetrovoxParseCategoryPaths( $sXmlFileContents )
{
  $aaTemp = '';
  $aaResult = '';
  
  $sTemp = 
     preg_replace(
        "/^(.|\n)*<category-paths>((.|\n)*)<\/category-paths>(.|\n)*$/m",
        "$2", $sXmlFileContents);

  $sTemp = str_replace('<path>', '', $sTemp);
  $sTemp = str_replace('</path>', '', $sTemp);
 
  $aaTemp = explode("\n", $sTemp);
  foreach ($aaTemp as $sValue)
  {
    $sValue = trim($sValue);
    if ($sValue != '')
      { $aaResult[] = $sValue; }

  } //-- foreach

  return $aaResult;
} //-- function: fnGetUniquePathList

?>
                        