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