]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/UPT/Library/Xml/XmlRoutines.py
This patch is going to:
[mirror_edk2.git] / BaseTools / Source / Python / UPT / Library / Xml / XmlRoutines.py
index 7029e59889726f88fd6a91e1c70b806f6348d345..d7614b884990248fd52cbf5e67f9fefbdf447425 100644 (file)
@@ -2,7 +2,7 @@
 # This is an XML API that uses a syntax similar to XPath, but it is written in\r
 # standard python so that no extra python packages are required to use it.\r
 #\r
-# Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>\r
 #\r
 # This program and the accompanying materials are licensed and made available \r
 # under the terms and conditions of the BSD License which accompanies this \r
@@ -22,6 +22,7 @@ XmlRoutines
 #\r
 import xml.dom.minidom\r
 import re\r
+import codecs\r
 from Logger.ToolError import PARSER_ERROR\r
 import Logger.Log as Logger\r
 \r
@@ -219,7 +220,7 @@ def XmlNodeName(Dom):
 #\r
 def XmlParseFile(FileName):\r
     try:\r
-        XmlFile = open(FileName)\r
+        XmlFile = codecs.open(FileName, 'rb')\r
         Dom = xml.dom.minidom.parse(XmlFile)\r
         XmlFile.close()\r
         return Dom\r