Do something like this:

function parseXML($xmlFile)
{
        $theParser = xml_parser_create();
        xml_set_element_handler($theParser, "startElementHandler", 
"endElementHandler");
        //parse your XML here

        return $attributeArray;
}

function startElementHandler($theParser, $theTag, $theAttrs)
{
        global $attributeArray;

        //do your attribute handling here; maybe something like this
        $attributeArray[] = $theAttrs;
}


Ben


On Tuesday, November 13, 2001, at 07:34 PM, Michael Harris wrote:

> Can anybody tell me if there is a way to build an array or some other
> means of collecting the attributes from the Start Element Handler so I
> can return them back to my main application?
>
> Thanks for any help,
> -Mike
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to