define(INFO, $path."info.xml");

$infoXML = new DOMDocument();

$infoXML->load(INFO);

$category = getXMLTextContent($infoXML, "group");

 

function getXMLTextContent($xml, $field){
 $vars = $xml->getElementsByTagName($field);
 foreach($vars as $var){
  foreach($var->childNodes as $child) {
   if ($child->nodeType == XML_CDATA_SECTION_NODE) {
    return $child->textContent;
   }
  }
 }
}

 

+ Recent posts