Php domdocument get node html
Description of the current situation:I have a folder full of pages (pages-folder), each page inside that folder has (among other things) a div with The code that loads the divs:
Now the problem is that if the page I am loading has a child, like an image: Question:How do I make the code display the full html inside the div id="short-info" including for instance that image rather than just the text? (PHP 5, PHP 7, PHP 8) DOMDocument::getElementsByTagName — Searches for all elements with given local tag name Descriptionpublic DOMDocument::getElementsByTagName(string ParametersqualifiedName The local name (without namespace) of the tag to match on. The special value Return ValuesA new DOMNodeList object containing all the matched elements. ExamplesExample #1 Basic Usage Example
The above example will output: Patterns of Enterprise Application Architecture Design Patterns: Elements of Reusable Software Design Clean Code See Also
James L ¶ 14 years ago
Philip N ¶ 12 years ago
gurmukh24 at gmail dot com ¶ 13 years ago
any html code here
?> calvin at g mail ¶ 11 years ago
getTags( $dom, $tagName, $attrName, $attrValue ){ gem at rellim dot com ¶ 17 years ago
$params as $param) { yaakov dot moddel at gmail dot com ¶ 10 years ago
simon at onepointltd dot com ¶ 9 years ago
$htmlDocDom->loadHTMLFile($url); Finding values of a node ¶ 15 years ago
rsvvuuren at hotmail dot com ¶ 8 years ago
$elemName; metron at underhive-planet dot com ¶ 11 years ago
= new DOMDocument('1.0', 'utf-8'); Mateusz K ¶ 2 years ago with the same nodes. Marco Maranao ¶ 12 years ago
if (
foreach(
if(
if(!empty(
echo
foreach(
echo
james ¶ 12 years ago if (!@ for ( Hope this is helpful. jason at shaped dot ca
¶ 14 years ago |