I have an xml file I need to get specific value from. I want to get only the <SessionsTotal> from the Stream named osprey.stream. I can get <ConnectionsCurrent> from root, but if another stream comes online it skews the numbers as I do not want all streams total, only counts for this specific stream as noted.
XML file here. http://web1.danvilleva.gov/connectioncounts.xml
$xml_data=file_get_contents("http://web1.danvilleva.gov/connectioncounts.xml");
$doc = new DOMDocument();
$doc->loadXML($xml_data);
$wms = $doc->getElementsByTagName('WowzaStreamingEngine');
$currentlistener = $wms->item(0)->getElementsByTagName("ConnectionsCurrent")->item(0)->nodeValue;
echo "$currentlistener";
Thanks in advance for help.