code: def randomChildElement(self, node):
          
          choices = [e for e in node.childNodes
                     if e.nodeType == e.ELEMENT_NODE]
          chosen = random.choice(choices)
          if _debug:
              sys.stderr.write('%s available choices: %s\n' % \
                  (len(choices), [e.toxml() for e in choices]))
              sys.stderr.write('Chosen: %s\n' % chosen.toxml())
          return chosen
docs: choose a random child element of a node
          
          This is a utility method used by do_xref and do_choice.