Problem with XML_parser
| From: | Alex MacLeod | Date: | Thu, 08 Jul 2004 17:23:13 +0000 |
| Subject: | Problem with XML_parser | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-13553@lists.php.net to get a copy of this message | ||
Hi everyone,
This is my first time posting so excuse me if I miss any list etiquette.
I've just installed pear onto my Mac (OS 10.3.4) and really need to use the
XML_parser package for a project I'm currently involved in.
I have been reading the documentation and on the second page sadly entitled
"Basic Example" I copy the example and save it locally then try to test the
script. But I get the error:
"Parse error: parse error, expecting
T_OLD_FUNCTION' or T_FUNCTION' or
T_VAR' or '}'' in /Users/admin/Sites/downloaded
source/parse_using_pear.php on line 3"
So scratching my head I check whats going on on line 3 and find that there
are no curly brackets yet???
Here are the first 10 lines of the code:
1 <?php
2 require_once 'XML/Parser.php';
3
4 class myParser extends XML_Parser
5 {
6 function myParser()
7 {
8 parent::XML_Parser();
9 }
10
As you can see, theres nothing there that should be throwing this error
up????
Or is there.
Thanks for any help you can offer
Alex