Re: xml_parse() - Accessing attributes of empty elements
| From: | Egon Schmid | Date: | Mon, 24 Jul 2000 18:45:10 +0000 |
| Subject: | Re: xml_parse() - Accessing attributes of empty elements | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7945@lists.php.net to get a copy of this message | ||
nastySprite wrote:
> I am currently writing a script using the xml_parse functions of PHP3.
> Now how do I access attributes of empty elements?
>
> For example:
> <ELEMENT ATTR="test"/>
>
> Using the endElement function of
> xml_set_element_handler(parser,startElement,endElement) I cannot read any
> attribute, because the function is not passed an $attrs like "startElement".
It can be fetched with the startElement() function. See example 3 in the
docs.
-Egon
--
SIX Offene Systeme GmbH · Stuttgart - Berlin - New York
Sielminger Straße 63 · D-70771 Leinfelden-Echterdingen
Fon +49 711 9909164 · Fax +49 711 9909199 http://www.six.de