def _check_for_pi_nodes(self, list, inheader):
list = list[:]<EOL>while list:<EOL><INDENT>elt = list.pop()<EOL>t = elt.nodeType<EOL>if t == _Node.PROCESSING_INSTRUCTION_NODE:<EOL><INDENT>raise ParseException('<STR_LIT>' +elt.nodeName + '<STR_LIT>',<EOL>inheader, elt.parentNode, self.dom)<EOL><DEDENT>elif t == _Node.DOCUMENT_TYPE_NODE:<EOL><INDENT>raise ParseException('<STR_LIT>', inheader,<EOL>elt.parentNode, self.dom)<EOL><DEDENT>list += _children(elt)<EOL><DEDENT>
Raise an exception if any of the list descendants are PI nodes.