def ParseHeaderElements(self, ofwhat):
d = {}<EOL>lenofwhat = len(ofwhat)<EOL>c, crange = self.header_elements[:], list(range(len(self.header_elements)))<EOL>for i,what in [ (i, ofwhat[i]) for i in range(lenofwhat) ]:<EOL><INDENT>if isinstance(what, AnyElement): <EOL><INDENT>raise EvaluateException('<STR_LIT>')<EOL><DEDENT>v = []<EOL>occurs = <NUM_LIT:0><EOL>namespaceURI,tagName = what.nspname,what.pname<EOL>for j,c_elt in [ (j, c[j]) for j in crange if c[j] ]:<EOL><INDENT>prefix,name = SplitQName(c_elt.tagName)<EOL>nsuri = _resolve_prefix(c_elt, prefix)<EOL>if tagName == name and namespaceURI == nsuri:<EOL><INDENT>pyobj = what.parse(c_elt, self)<EOL><DEDENT>else:<EOL><INDENT>continue<EOL><DEDENT>v.append(pyobj)<EOL>c[j] = None<EOL><DEDENT>if what.minOccurs > len(v) > what.maxOccurs:<EOL><INDENT>raise EvaluateException('<STR_LIT>'%(len(v),what.minOccurs,what.maxOccurs))<EOL><DEDENT>if what.maxOccurs == <NUM_LIT:1>:<EOL><INDENT>if len(v) == <NUM_LIT:0>: v = None<EOL>else: v = v[<NUM_LIT:0>]<EOL><DEDENT>d[(what.nspname,what.pname)] = v<EOL><DEDENT>return d<EOL>
Returns a dictionary of pyobjs.
        ofhow -- list of typecodes w/matching nspname/pname to the header_elements.