code: def export_to_dom(self):
          
          namespaces = 'xmlns="http://www.neuroml.org/lems/%s" ' + \
                       'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + \
                       'xsi:schemaLocation="http://www.neuroml.org/lems/%s %s"'
  
          namespaces = namespaces%(self.target_lems_version,self.target_lems_version,self.schema_location)
  
          xmlstr = '<Lems %s>'%namespaces
  
          for include in self.includes:
              xmlstr += include.toxml()
  
          for target in self.targets:
              xmlstr += '<Target component="{0}"/>'.format(target)
  
          for dimension in self.dimensions:
              xmlstr += dimension.toxml()
              
          for unit in self.units:
              xmlstr += unit.toxml()
              
          for constant in self.constants:
              xmlstr += constant.toxml()
              
          for component_type in self.component_types:
              xmlstr += component_type.toxml()
              
          for component in self.components:
              xmlstr += component.toxml()
              
          xmlstr += '</Lems>'
  
          xmldom = minidom.parseString(xmlstr)
          return xmldom
docs: Exports this model to a DOM.