equal
deleted
inserted
replaced
2560 xmlfile.close() |
2560 xmlfile.close() |
2561 |
2561 |
2562 self.Project = plcopen.project() |
2562 self.Project = plcopen.project() |
2563 for child in tree.childNodes: |
2563 for child in tree.childNodes: |
2564 if child.nodeType == tree.ELEMENT_NODE and child.nodeName == "project": |
2564 if child.nodeType == tree.ELEMENT_NODE and child.nodeName == "project": |
2565 self.Project.loadXMLTree(child, ["xmlns", "xmlns:xhtml", "xmlns:xsi", "xsi:schemaLocation"]) |
2565 try: |
|
2566 result = self.Project.loadXMLTree(child, ["xmlns", "xmlns:xhtml", "xmlns:xsi", "xsi:schemaLocation"]) |
|
2567 except ValueError, e: |
|
2568 return _("Project file syntax error:\n\n") + str(e) |
2566 self.SetFilePath(filepath) |
2569 self.SetFilePath(filepath) |
2567 self.Project.RefreshElementUsingTree() |
2570 self.Project.RefreshElementUsingTree() |
2568 self.Project.RefreshDataTypeHierarchy() |
2571 self.Project.RefreshDataTypeHierarchy() |
2569 self.Project.RefreshCustomBlockTypes() |
2572 self.Project.RefreshCustomBlockTypes() |
2570 self.CreateProjectBuffer(True) |
2573 self.CreateProjectBuffer(True) |