function createTextNode($txt)
{
    return cur_doc()->createTextNode($txt);
}
 static function c_attrs($a, $v = null)
 {
     $p = func_get_args();
     $m = array();
     if (isStr($a) && isNumStr($v)) {
         $s = cur_doc()->createAttribute($a);
         $s->value = $v;
         return $s;
     }
     foreach ($p as $v) {
         if (isDrw($v)) {
             foreach ($v as $i => $k) {
                 $m[] = self::c_attrs($i, $k);
             }
         }
     }
     return pure($m);
 }