How to convert positional attributes in an xml file to normal attributes?

Is "Statistics.php"part of the "PEAR" package in PHP?

  • I commented out // include ("XML/Statistics.php"); since I do not have a XML directory on the server. This is the script that makes use of "Statistics". <?php require_once 'Statistics.php'; // include class file // include ("XML/Statistics.php"); // create object $xs = new XML_Statistics(); // define XML string $xmlFile = "sitemap.xml"; // analyze string $xs->analyzeFile($xmlFile); // count number of attributes echo "File contains " . $xs->countAttribute() . " attributes"; ?> This is the error message the server is givng me: Warning: require_once(Statistics.php) [function.require-once]: failed to open stream: No such file or directory in /home/distri10/public_html/xmlStats.php on line 14

  • Answer:

    the problem is this line: require_once 'Statistics.php'; not XML/Statistics.php it's trying to find file Statistics.php in the same folder where you are running your file. read this http://articles.techrepublic.com.com/5100-22-5216364.html

tjhauck2... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.