public function __construct($xml, $name = null, $rowname = 'row')
{
$this->_name = (string) ($name !== null) ? $name : $xml->attributes()->name;
foreach ($xml->{$rowname} as $rowxml) {
$row = array();
foreach ($rowxml->attributes() as $attkey => $attval) {
$row[$attkey] = (string) $attval;
}
foreach ($rowxml->children() as $child) {
// nested tags in rowset/row
$element = Element::parseElement($child);
$row[(string) $element->_name] = $element;
}
$rowObject = new RowSetRow($row);
$rowObject->setStringValue((string) $rowxml);
$this->append($rowObject);
}
}