Re: dom_document_get_element_by_id
| From: | John Huntjens | Date: | Mon, 08 Sep 2003 16:41:59 +0000 |
| Subject: | Re: dom_document_get_element_by_id | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4432@lists.php.net to get a copy of this message | ||
<snip>
> you have to define the ids with a DTD. there are no default
> "id"-attributes in the XML-specs.
Ahh, that clarify's alot.
> Add:
> <!DOCTYPE test [
> <!ATTLIST el1 id ID #REQUIRED>
> <!ATTLIST el2 id ID #REQUIRED>
> ]>
>
> to your XML document, and it should work.
Thanks for your quick answer, this quireled me al day!
> or use XPath to access the nodes:
> "//@id='id1'"
Can you give me a pointer how to do that in php5, I thought that this was
not implemented (yet)?
Gr,
John