parameters: (self)
return_statement: return self.__root
docstring: Read through the stringified XML and parse it into a tree of Element
          objects. This method assumes a filename was specified when the class
          constructor was called. Otherwise, there will be nothing to parse.
  
          A new tree of Element objects is created each time this method is
          called. This is not the way to process multiple XML files into a
          single parse tree.
docstring_summary: Read through the stringified XML and parse it into a tree of Element
          objects. This method assumes a filename was specified when the class
          constructor was called. Otherwise, there will be nothing to parse.
docstring_tokens: Read through the stringified XML and parse it into a tree of Element objects . This method assumes a filename was specified when the class constructor was called . Otherwise there will be nothing to parse .
function: def parse(self):
          """
          Read through the stringified XML and parse it into a tree of Element
          objects. This method assumes a filename was specified when the class
          constructor was called. Otherwise, there will be nothing to parse.
  
          A new tree of Element objects is created each time this method is
          called. This is not the way to process multiple XML files into a
          single parse tree.
          """
  
          if self.__xml_string is None:
              return
          else:
              self.__node_stack = list()
  
          for token, content, loc in XML(self.__xml_string):
  
              # This next line presents a problem processing XML with special
              # formatting characters. It generates an exception. Since it is
              # only debug, we'll just comment this out until the XML is
              # updated to remove the special characters.
              #
              #            DEBUG.debug( 'token, content, loc are %s=%s %s=%s %s=%s'
              #                         % (type(token).__name__,str(token),
              #                            type(content).__name__,str(content),
              #                            type(loc).__name__,str(loc) ) )
  
              if token == "START":
                  name = content[0]
                  attr = content[1]
                  self._startElement(name, attr)
              elif token == "TEXT":
                  self._cData(content)
              elif token == "END":
                  name = content[0]
                  self._endElement(name)
  
          return self.__root
function_tokens: def parse ( self ) : if self . __xml_string is None : return else : self . __node_stack = list ( ) for token , content , loc in XML ( self . __xml_string ) : # This next line presents a problem processing XML with special # formatting characters. It generates an exception. Since it is # only debug, we'll just comment this out until the XML is # updated to remove the special characters. # #            DEBUG.debug( 'token, content, loc are %s=%s %s=%s %s=%s' #                         % (type(token).__name__,str(token), #                            type(content).__name__,str(content), #                            type(loc).__name__,str(loc) ) ) if token == "START" : name = content [ 0 ] attr = content [ 1 ] self . _startElement ( name , attr ) elif token == "TEXT" : self . _cData ( content ) elif token == "END" : name = content [ 0 ] self . _endElement ( name ) return self . __root