Added support for compatibility with older version of c_ext
authorLaurent Bessard
Wed, 08 May 2013 23:13:10 +0200
changeset 1100 1f46424c6220
parent 1099 d9c28879e55b
child 1101 5a0b439cf576
Added support for compatibility with older version of c_ext
CodeFileTreeNode.py
--- a/CodeFileTreeNode.py	Wed May 08 22:56:31 2013 +0200
+++ b/CodeFileTreeNode.py	Wed May 08 23:13:10 2013 +0200
@@ -21,7 +21,7 @@
             xmlfile.close()
             
             for child in tree.childNodes:
-                if child.nodeType == tree.ELEMENT_NODE and child.nodeName == "CodeFile":
+                if child.nodeType == tree.ELEMENT_NODE and child.nodeName in ["CodeFile", "CFile"]:
                     self.CodeFile.loadXMLTree(child, ["xmlns", "xmlns:xsi", "xsi:schemaLocation"])
                     self.CreateCodeFileBuffer(True)
         else:
@@ -82,7 +82,7 @@
         text = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"
         extras = {"xmlns":"http://www.w3.org/2001/XMLSchema",
                   "xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance",
-                  "xsi:schemaLocation" : "codefile.xsd"}
+                  "xsi:schemaLocation" : "code_file.xsd"}
         text += self.CodeFile.generateXMLText("CodeFile", 0, extras)
 
         xmlfile = open(filepath,"w")