Re: DOM Element default ID attribute
| From: | Eli | Date: | Thu, 22 Feb 2007 05:44:30 +0000 |
| Subject: | Re: DOM Element default ID attribute | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249211@lists.php.net to get a copy of this message | ||
Peter Lauri wrote:
This was not clear for me, do you mean: <a peter> => <a id="peter">No. Let me try to be more clear.. Say you got the element <elem key="peter"> , then I want the DOMDocument to automatically convert the 'key' attribute to an ID-Attribute, as done with DOMElement::setIdAttribute() function. The ID-Attribute is indexed and can be quickly gotten via DOMDocument::getElementById() function. I'm trying to avoid looping on all nodes overriding the importNode() and __construct() methods of DOMDocument. -thanks.