php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40175 Problems in DOM XML hierarchy
Submitted: 2007-01-19 19:44 UTC Modified: 2007-01-19 20:09 UTC
From: galvao at galvao dot eti dot br Assigned:
Status: Not a bug Package: DOM XML related
PHP Version: 5.2.0 OS: All
Private report: No CVE-ID: None
 [2007-01-19 19:44 UTC] galvao at galvao dot eti dot br
Description:
------------
The childNodes function returns a DOMNodeList, but while iterating over it I find DOMTexts and DOMElements,  instead of DOMNodes.

Reproduce code:
---------------
XML: http://pastebin.ca/321816
PHP: http://pastebin.ca/321822

Expected result:
----------------
object(DOMNode)#x (0) {
}
object(DOMNode)#x (0) {
}

Where 'x' is a number.

Actual result:
--------------
object(DOMText)#x (0) {
}
object(DOMElement)#x (0) {
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-19 19:52 UTC] rrichards@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 [2007-01-19 19:52 UTC] tony2001@php.net
The XML seems to be broken:

Warning: DOMDocument::load(): Premature end of data in tag SyncQueue line 3 in /tmp/test.xml, line: 13 in /tmp/5.php on line 4
Erro ao abrir o arquivo XML
 [2007-01-19 20:01 UTC] galvao at galvao dot eti dot br
Sorry forgot to close the root element.

XML now at http://pastebin.ca/321840
 [2007-01-19 20:09 UTC] rrichards@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

still bogus - they're all domnodes
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC