docs: def parse(self, elt, ps):
          '''
          processContents -- 'lax' | 'skip' | 'strict', 'strict'
          1) if 'skip' check namespaces, and return the DOM node.
          2) if 'lax' look for declaration, or definition.  If
             not found return DOM node.
          3) if 'strict' get declaration, or raise.
          '''
          skip = self.processContents == 'skip'
          nspname,pname = _get_element_nsuri_name(elt)
          what = GED(nspname, pname)
          if not skip and what is not None:
              pyobj = what.parse(elt, ps)
              try:
                  pyobj.typecode = what
              except AttributeError, ex:
                  # Assume this means builtin type.
                  pyobj = WrapImmutable(pyobj, what)
              return pyobj
          
          # Allow use of "<any>" element declarations w/ local
          # element declarations
          prefix, typeName = SplitQName(_find_type(elt))
          if not skip and typeName:
              namespaceURI = _resolve_prefix(elt, prefix or 'xmlns')
              # First look thru user defined namespaces, if don't find
              # look for 'primitives'.
              pyclass = GTD(namespaceURI, typeName) or Any
              what = pyclass(pname=(nspname,pname))
              pyobj = what.parse(elt, ps)
              try:
                  pyobj.typecode = what
              except AttributeError, ex:
                  # Assume this means builtin type.
                  pyobj = WrapImmutable(pyobj, what)
                  
              what.typed = True
              return pyobj
  
          if skip:
              what = XML(pname=(nspname,pname), wrapped=False)
          elif self.processContents == 'lax':
              what = Any(pname=(nspname,pname), unique=True)
          else:
              what = Any(pname=(nspname,pname), unique=True)
  
          try:
              pyobj = what.parse(elt, ps)
          except EvaluateException, ex:
              self.logger.debug("error parsing:  %s" %str(ex))
  
              if len(_children(elt)) != 0:
                  self.logger.debug('parse <any>, return as dict')
                  return Any(aslist=False).parse_into_dict_or_list(elt, ps)
  
              self.logger.debug("Give up, parse (%s,%s) as a String", 
                    what.nspname, what.pname)
              what = String(pname=(nspname,pname), typed=False)
              return WrapImmutable(what.parse(elt, ps), what)
  
          if pyobj is None: 
              return
  
          # dict is elementName:value pairs
          if type(pyobj) is dict:
              return pyobj
  
          try:
              pyobj.typecode = what
          except AttributeError:
              pyobj = WrapImmutable(pyobj, what)
  
          return pyobj