mikinum7XmlPageRank'; $VEOF=''; $xmlNodesBOF=""; $xmlNodesEOF=""; $xmlEdgesBOF=""; $xmlEdgesEOF=""; $xmlNodes=$VBOF.$xmlNodesBOF; $numEdge=0; do{ //if(!$line=fgets($fp))die('Can\'t read line'); $line=fgets($fp); if($line===FALSE)break; $exploded=explode(':', $line); $node=$exploded[0]; $xmlNodes.=""; $Edges=explode(' ', $exploded[1]); if(sizeof($Edges)!=2){ for($i=1;$i"; $numEdge++; } } }while(TRUE); $xmlToWrite=$xmlNodes.$xmlNodesEOF.$xmlEdgesBOF.$xmlEdges.$xmlEdgesEOF.$VEOF; //if(!fputs($xml, $xmlToWrite))die('Can\'t write file'); fputs($xml, $xmlToWrite); fclose($xml); fclose($fp); ?>