Page 1 of 1

help xml parser

Posted: Wed Aug 27, 2003 10:33 am
by yaron
Hello,
I'm using xml parser to get data from xml file to mySql.
I get the data from the startElement function:

startElement($parser, $name, $attribs)

each time the startElement is called I store the tag attris (that what I need). all attris together are 1 row in my db.
The problem is that I want to enter to the same row another parameter which is not one of the attris (the xml file name for example).
of course startElement doesn't get this info and I don't know how send the function this addition.
I can't see the call for that function.
I even tried to make a global variable but with no results.
any ideas?
Thank you all

Posted: Wed Aug 27, 2003 12:32 pm
by McGruff
Script problems and how to's should be posted in the normal forum. The advanced forum is more for theoretical or in depth discussion of programming techniques - please read the sticky thread.

A discussion on the different approaches to parsing xml might be an advanced topic, but a problem with a specific script is not.

Thanks.

Posted: Wed Aug 27, 2003 11:23 pm
by BDKR
Have you checked PHPBuilder.com. There is a tutorial over there on parsing XML files. As I said elsewhere, I'm not a big XML guy, but I've read and chewed on this tutorial and it did help. :-)

Cheers,
BDKR