Ok well that function is the character_data_handler function.

Here is the Start Element function:

function startElement($parser, $name, $attrs='') {
        global $tag, $Data, $p;
        array_push( $tag, $name );
        while ( list($Key,$Val) = each($attrs) ) {
        $p->attr_data["$name:$Key"] = trim($Val);


Here is the end element function:

function endElement($parser, $name) {
        global $tag;


And I just wanted to mention that a lot of that code is from your tutorial
(Anlysis and Solutions). I was just experimenting with it, trying to get
different things to work. You should know pretty well what everything does.
Another thing is that, I think this problem might have something to do with
the array_push function in the Start Element function, however I am not

-----Original Message-----
From: Analysis & Solutions [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 10:04 PM
To: PHP List
Subject: Re: [PHP] XML: Similiar Multiple Tags With Different Data

On Mon, May 13, 2002 at 05:49:04PM +0200, Sebastian A. wrote:

> function elementContent($parser, $data, $attrs='') {
>         global $tag, $p;
>         $ti = sizeof( $tag ) - 1;
>         if ( $tag[$ti] == 'LIST_ITEM' ) {
>                 $p->ART_ID[] = $data;
>         }
> }

You're not posting enough of your code for us to understand how you got

For example, which parser function are we looking at here?  I'm guessing
it's the
character_data_handler.  But, it's not supposed to have an $attrs argument.

[OY! I just cought a bug in my online tutorial...  Had an $Attr argument for
the end
handler.  Fixed it.]

Also, where's the $tag array coming from?  Why's it an array?  Let alone,
why are you
trying to process stuff in the content handler when it's more effective to
handle it
in the end handler?


               PHP classes that make web design easier
        SQL Solution  |   Layout Solution   |  Form Solution
    sqlsolution.info  | layoutsolution.info |  formsolution.info
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7 Av #4AJ, Brooklyn NY     v: 718-854-0335     f: 718-854-0409

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to