On Wed, May 15, 2002 at 07:49:58PM +0200, Sebastian A. wrote:

> performance and efficiency doesn't really interest me at this point. I just
> want to get the thing working before I work on improving it.

But your haste is making waste.  Even funnier, in your haste, you're making more work 
for yourself.

> Anyway, you asked "What's the point of doing the if == 'LIST_ITEM' check in
> the character handler rather
> than the end handler?", well the point is that if it is LIST_ITEM I want to
> the content in a variable. As far as I know this cannot be done in the end
> handler.

That's why I temporarily store the content in the $CData array.  Then, when I get to 
the end handler, I extract the data from the $CData array, and do what is necessary 
with it.

> Second of all the array_push is there for a reason I am not even
> sure about, but when I try to remove it the code doesn't work.

But your code isn't working with it either.  It's adds a whole series of unnecessary 

Again, look at the tutorial, http://www.analysisandsolutions.com/code/phpxml.htm, and
modify ONLY what you need to.  In your case, the only thing you need to change is
adding a special case for 'LIST_ITEM' to the switch in the end handler function.  
THAT'S where you'll stick that stuff into the $p object you were trying to do in the
content handler.  Oh, of course, drop the case in that switch statement that don't
apply to your DTD, but that goes without saying.

Good luck,


               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

Reply via email to