Doc #77219 [Opn->Ver]: childNodes property not in DOMElement manual

From: Date: Thu, 29 Nov 2018 16:53:18 +0000
Subject: Doc #77219 [Opn->Ver]: childNodes property not in DOMElement manual
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16187@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77219&edit=1

 ID:                 77219
 Updated by:         cmb@php.net
 Reported by:        pavel dot pilat at gmail dot com
 Summary:            childNodes property not in DOMElement manual
-Status:             Open
+Status:             Verified
 Type:               Documentation Problem
 Package:            DOM XML related
 Operating System:   Windows 7 x64 SP1
 PHP Version:        7.1.24
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2018-11-29 12:47:58] 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 12:38:43] Wes dot example at example dot org

It's in DOMNode, DOMElement extends DomNode

------------------------------------------------------------------------
[2018-11-29 12:35:38] 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>";
}
?> 



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77219&edit=1


Thread (5 messages)

« previous php.doc.bugs (#16187) next »