php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77219 childNodes property not in DOMElement manual
Submitted: 2018-11-29 12:35 UTC Modified: 2018-11-29 18:28 UTC
From: pavel dot pilat at gmail dot com Assigned: cmb (profile)
Status: Closed Package: DOM XML related
PHP Version: 7.1.24 OS: Windows 7 x64 SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavel dot pilat at gmail dot com
New email:
PHP Version: OS:

 

 [2018-11-29 12:35 UTC] pavel dot pilat at gmail dot com
Description:
------------
I ran into this code (from https://www.w3schools.com/php/php_xml_dom.asp), you may see it in the test script section.

I tried it and it works. What attracted my attention was "childNodes" property of $x which is DOMElement. The manual page for the class DOMElement does not describe this property. Please add it.

http://php.net/manual/en/class.domelement.php

Test script:
---------------
<?php
$xmlDoc = new DOMDocument();
$xmlDoc->load("note.xml");

$x = $xmlDoc->documentElement;
foreach ($x->childNodes AS $item) {
  print $item->nodeName . " = " . $item->nodeValue . "<br>";
}
?> 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-29 12:38 UTC] Wes dot example at example dot org
It's in DOMNode, DOMElement extends DomNode
 [2018-11-29 12:47 UTC] pavel dot pilat at gmail dot com
I see - I was confused by the /* Inherited methods */ section which specifies methods already described on the DOMNode page. I thought the same was supposed to be for inherited properties.

If not feel free to close this bug.
 [2018-11-29 16:53 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2018-11-29 18:27 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=346131
Log: Fix #77219: childNodes property not in DOMElement manual

We document the inherited properties of all DOM classes.
 [2018-11-29 18:28 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2018-11-29 18:28 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=7dd8d0771a3af3a5b9cd3353e8e224270ebca108
Log: Fix #77219: childNodes property not in DOMElement manual
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 06:01:29 2024 UTC