code: def _check_for_pi_nodes(self, list, inheader):
          '''Raise an exception if any of the list descendants are PI nodes.
          '''
          list = list[:]
          while list:
              elt = list.pop()
              t = elt.nodeType
              if t == _Node.PROCESSING_INSTRUCTION_NODE:
                  raise ParseException('Found processing instruction "<?' + \
                          elt.nodeName + '...>"',
                          inheader, elt.parentNode, self.dom)
              elif t == _Node.DOCUMENT_TYPE_NODE:
                  raise ParseException('Found DTD', inheader,
                          elt.parentNode, self.dom)
              list += _children(eltf _check_for_pi_nodes(self, list, inheader):
          '''Raise an exception if any of the list descendants are PI nodes.
          '''
          list = list[:]
          while list:
              elt = list.pop()
              t = elt.nodeType
              if t == _Node.PROCESSING_INSTRUCTION_NODE:
                  raise ParseException('Found processing instruction "<?' + \
                          elt.nodeName + '...>"',
                          inheader, elt.parentNode, self.dom)
              elif t == _Node.DOCUMENT_TYPE_NODE:
                  raise ParseException('Found DTD', inheader,
                          elt.parentNode, self.dom)
              list += _children(elt)
docs: Raise an exception if any of the list descendants are PI nodes.