How get value by tag name from XML

Hello Friends!
Hope you all are doing well! :)
I am here now going to share some useful information with you to get the specific tag value from XML format.

$dom = new DOMDocument;
$dom->loadXML($result); /* define XML path */
$customValues = $dom->getElementsByTagName('executionStatus');
foreach ($customValues as $val) {
    echo $val->nodeValue, PHP_EOL;

Hope you all will enjoy this code!

Leave a Reply

Your email address will not be published. Required fields are marked *