getElementsByTagName() public method

public getElementsByTagName ( $tagName ) : Prado\Collections\TList
return Prado\Collections\TList list of all child elements that have the specified tag-name
Example #1
0
 public function testGetElementsByTagName()
 {
     $element = new TXmlElement('tag');
     $element->Elements[] = new TXmlElement('tag');
     $element->Elements[] = new TXmlElement('tag');
     self::assertEquals(2, count($element->getElementsByTagName('tag')));
 }
Example #2
0
 /**
  * Loads the service configuration
  * @param TXmlElement $xml configuration
  */
 public function loadConfig(TXmlElement $xml)
 {
     foreach ($xml->getElementsByTagName('rpcapi') as $_apiProviderXml) {
         $_properties = $_apiProviderXml->getAttributes();
         if (($_id = $_properties->remove('id')) === null || $_id == "") {
             throw new TConfigurationException('rpcservice_apiproviderid_required');
         }
         if (isset($this->apiProviders[$_id])) {
             throw new TConfigurationException('rpcservice_apiproviderid_duplicated');
         }
         $this->apiProviders[$_id] = $_properties;
     }
 }