FeaturePhp/Helper/XmlParser.php
public static function get($node, $tagName, $count = 1) {
        $node = $node->{$tagName};
        if ($node->count() !== $count)
            throw new XmlParserException("xml does not have exactly $count $tagName's");
        return $node[0];
    }
public static function get($node, $tagName, $count = 1) {
        $node = $node->{$tagName};
        if ($node->count() !== $count)
            throw new XmlParserException("xml does not have exactly $count $tagName's");
        return $node[0];
    }
public static function get ( $ node , $ tagName , $ count = 1 ) { $ node = $ node -> { $ tagName } ; if ( $ node -> count ( ) !== $ count ) throw new XmlParserException ( "xml does not have exactly $count $tagName's" ) ; return $ node [ 0 ] ; }
Returns a child node for a tag name from an XML node.
@param \SimpleXMLElement $node
@param string $tagName
@param int $count how many child nodes for the tag name are allowed
@return \SimpleXMLElement
Returns a child node for a tag name from an XML node .