php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52136 ->children matches only nodetype=1 (no text node is matched)
Submitted: 2010-06-22 04:49 UTC Modified: 2021-07-06 14:58 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: giorgio dot liscio at email dot it Assigned: cmb (profile)
Status: Wont fix Package: SimpleXML related
PHP Version: 5.3.2 OS: all
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-06-22 04:49 UTC] giorgio dot liscio at email dot it
Description:
------------
if you have an xml like this:

<div id="test">
   hey
   <b>hey</b>
   hey
   <i>this</i>
   is
   <u>a</u>
   test
</div>

only <b> <i> <u> children elements are matched in ->children

implementing ->childNodes as in HTMLDOM can be a good solution

in htmldom
.children matches only nodeType=1
.childNodes matches all 

thank you


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-23 01:42 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: rrichards
 [2017-10-24 06:15 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: rrichards +Assigned To:
 [2021-07-06 14:58 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-07-06 14:58 UTC] cmb@php.net
I don't think that SimpleXML will ever be able to properly handle
mixed content, and given that there was no traction for more than
ten years on this ticket, I'm closing as WONTFIX.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Jun 30 09:05:45 2022 UTC