]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Python/XmlRoutines.py
Fix component name bugs when input Controller Name is invalid
[mirror_edk2.git] / Tools / Python / XmlRoutines.py
index 2707bcbb978c4fc08411c055cedf6a01e27b82cf..53f5aa8f6157057b24cdf4d965923be3859d6c0e 100755 (executable)
@@ -1,7 +1,16 @@
 #!/usr/bin/env python
 
-# This is an XML API that uses a syntax similar to XPath, but it is written in
-# standard python so that no extra python packages are required to use it.
+# Copyright (c) 2007, Intel Corporation
+# All rights reserved. This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution.  The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+# 
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+"""This is an XML API that uses a syntax similar to XPath, but it is written in
+standard python so that no extra python packages are required to use it."""
 
 import xml.dom.minidom
 
@@ -35,10 +44,10 @@ def XmlElementData (Dom):
   """Get the text for this element."""
   return Dom.firstChild.data.strip()
 
-def XmlAttribute (Dom, String):
-  """Return a single attribute that named by String."""
+def XmlAttribute (Dom, AttName):
+  """Return a single attribute named AttName."""
   try:
-    return Dom.getAttribute(String)
+    return Dom.getAttribute(AttName)
   except:
     return ''