[PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread John Huntjens
Is this function working? Test program: $dom = new domDocument(); $dom->load("test.xml"); $node = $dom->getElementById("id1"); print_r($node); Test file: It seems to me that always a emty object is returned? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit

Re: [PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread Christian Stocker
On 9/8/03 5:11 PM, John Huntjens wrote: Is this function working? yes. see: http://bugs.php.net/bug.php?id=17629 http://bugs.php.net/bug.php?id=16647 for details chregu Test program: $dom = new domDocument(); $dom->load("test.xml"); $node = $dom->getElementById("id1"); print_r($node); Test f

Re: [PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread John Huntjens
> > Is this function working? > yes. > > see: > > http://bugs.php.net/bug.php?id=17629 > http://bugs.php.net/bug.php?id=16647 > > for details I do not understand the workaround? I am using latest cvs php5 capitalizing the ID's to gives no result. Should I define a DTD to find the ID's?

Re: [PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread Christian Stocker
On 9/8/03 5:25 PM, John Huntjens wrote: Is this function working? yes. see: http://bugs.php.net/bug.php?id=17629 http://bugs.php.net/bug.php?id=16647 for details I do not understand the workaround? I am using latest cvs php5 you have to define the ids with a DTD. there are no default "id"-a

Re: [PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread Christian Stocker
On 9/8/03 5:55 PM, Christian Stocker wrote: On 9/8/03 5:25 PM, John Huntjens wrote: or use XPath to access the nodes: "//@id='id1'" öööhm ;) this should better be "//[EMAIL PROTECTED]'id1']" AFAIK... chregu -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: ht

Re: [PHP-DEV] dom_document_get_element_by_id

2003-09-08 Thread John Huntjens
> 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: > > > ]> > > 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='id