/* * call-seq: * attributes * * Get a hash of the attributes for this DTD. */ static VALUE attributes(VALUE self) { xmlDtdPtr dtd; VALUE hash; Data_Get_Struct(self, xmlDtd, dtd); if(!dtd->attributes) return Qnil; hash = rb_hash_new(); xmlHashScan((xmlHashTablePtr)dtd->attributes, element_copier, (void *)hash); return hash; }