Index: src/sans/dataloader/readers/cansas_reader.py
===================================================================
--- src/sans/dataloader/readers/cansas_reader.py	(revision ac5b69d317038c3025e6c4a3397e52b2a3012a79)
+++ src/sans/dataloader/readers/cansas_reader.py	(revision 92a2ecd0b80c92c647282aa8860c7840fcab5010)
@@ -372,5 +372,6 @@
                 tagname = node.tag.replace(base_ns, "")
                 tagname_original = tagname
-                if tagname == "fitting_plug_in":
+                if tagname == "fitting_plug_in" or tagname == "pr_inversion" or\
+                    tagname == "invariant":
                     continue
                 names.append(tagname)
@@ -517,5 +518,9 @@
                 else:
                     save_data1d = data1d
-                if tagname_original != "fitting_plug_in":
+                if tagname_original == "fitting_plug_in" or \
+                    tagname_original == "invariant" or \
+                    tagname_original == "pr_inversion":
+                    pass
+                else:
                     data1d = save_data1d
                     # Remove tagname from names to restore original base
Index: src/sans/perspectives/invariant/invariant_panel.py
===================================================================
--- src/sans/perspectives/invariant/invariant_panel.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/perspectives/invariant/invariant_panel.py	(revision 92a2ecd0b80c92c647282aa8860c7840fcab5010)
@@ -218,6 +218,7 @@
             if new_doc is not None:
                 if doc is not None and hasattr(doc, "firstChild"):
-                    child = new_doc.firstChild.firstChild
-                    doc.firstChild.appendChild(child)  
+                    child = new_doc.getElementsByTagName("SASentry")
+                    for item in child:
+                        doc.firstChild.appendChild(item)
                 else:
                     doc = new_doc
Index: src/sans/perspectives/invariant/invariant_state.py
===================================================================
--- src/sans/perspectives/invariant/invariant_state.py	(revision 51f1460382d03af9a969830094572115961c474d)
+++ src/sans/perspectives/invariant/invariant_state.py	(revision 92a2ecd0b80c92c647282aa8860c7840fcab5010)
@@ -254,4 +254,5 @@
         : param entry_node: XML node within the XML document at which we will append the data [optional]
         """
+        # TODO: Get this to work
         from xml.dom.minidom import getDOMImplementation
         import time
@@ -273,5 +274,5 @@
             else:
                 entry_node.appendChild(top_element)
-            
+                
         attr = newdoc.createAttribute("version")
         attr.nodeValue = '1.0'
@@ -352,5 +353,5 @@
             return None
         else:
-            return newdoc.toprettyxml()
+            return newdoc
         
     def fromXML(self, file=None, node=None):
@@ -742,5 +743,5 @@
                 for entry in entry_list:
                     
-                    sas_entry = self._parse_entry(entry)
+                    sas_entry, _ = self._parse_entry(entry)
                     invstate = self._parse_state(entry)
                     
@@ -809,5 +810,5 @@
         # Add the invariant information to the XML document
         if state is not None:
-            state.toXML(datainfo.name,doc=doc, entry_node=sasentry)
+            doc = state.toXML(datainfo.name,doc=doc, entry_node=sasentry)
         return doc
 
Index: src/sans/perspectives/pr/inversion_panel.py
===================================================================
--- src/sans/perspectives/pr/inversion_panel.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/perspectives/pr/inversion_panel.py	(revision 92a2ecd0b80c92c647282aa8860c7840fcab5010)
@@ -255,6 +255,7 @@
             if new_doc is not None:
                 if doc is not None and hasattr(doc, "firstChild"):
-                    child = new_doc.firstChild.firstChild
-                    doc.firstChild.appendChild(child)  
+                    child = new_doc.getElementsByTagName("SASentry")
+                    for item in child:
+                        doc.firstChild.appendChild(item)
                 else:
                     doc = new_doc
Index: src/sans/perspectives/pr/inversion_state.py
===================================================================
--- src/sans/perspectives/pr/inversion_state.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ src/sans/perspectives/pr/inversion_state.py	(revision 92a2ecd0b80c92c647282aa8860c7840fcab5010)
@@ -148,4 +148,5 @@
         
         """
+        #TODO: Get this to work
         from xml.dom.minidom import getDOMImplementation
 
@@ -221,5 +222,5 @@
             return None
         else:
-            return newdoc.toprettyxml()
+            return newdoc
 
     def fromXML(self, file=None, node=None):
@@ -470,5 +471,5 @@
 
                 for entry in entry_list:
-                    sas_entry = self._parse_entry(entry)
+                    sas_entry, _ = self._parse_entry(entry)
                     prstate = self._parse_prstate(entry)
                     #prstate could be None when .svs file is loaded
@@ -504,5 +505,5 @@
         # Sanity check
         if self.cansas == True:
-            doc =self.write_toXML(datainfo, prstate)        
+            doc = self.write_toXML(datainfo, prstate)        
             # Write the XML document
             fd = open(filename, 'w')
@@ -527,8 +528,8 @@
         # Create basic XML document
         doc, sasentry = self._to_xml_doc(datainfo)
-    
+        
         # Add the invariant information to the XML document
         if state is not None:
-            state.toXML(doc=doc, entry_node=sasentry)
+            doc = state.toXML(doc=doc, entry_node=sasentry)
             
         return doc 
