public static function fromXml(\DOMNodeList $xml)
    {
        $items = array();
        foreach ($xml as $xmlTag) {
            $items[] = Expense::fromXml($xmlTag);
        }
        return new static($items);
    }
public static function fromXml(\DOMNodeList $xml)
    {
        $items = array();
        foreach ($xml as $xmlTag) {
            $items[] = Expense::fromXml($xmlTag);
        }
        return new static($items);
    }
public static function fromXml ( \ DOMNodeList $ xml ) { $ items = array ( ) ; foreach ( $ xml as $ xmlTag ) { $ items [ ] = Expense :: fromXml ( $ xmlTag ) ; } return new static ( $ items ) ; }
Builds a ExpenseCollection object from XML.

@param \DOMNodeList $xml
The list of xml tags representing the expenses.

@return ExpenseCollection
A ExpenseCollection object
Builds a ExpenseCollection object from XML .