protected function getNodeAttrs($node) { $return = array(); foreach ($node->attributes as $n => $o) { $return[] = $n; } return $return; }