summaryrefslogtreecommitdiff
path: root/Tools/Python/XmlRoutines.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/Python/XmlRoutines.py')
-rwxr-xr-xTools/Python/XmlRoutines.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/Tools/Python/XmlRoutines.py b/Tools/Python/XmlRoutines.py
index 2707bcbb97..53f5aa8f61 100755
--- a/Tools/Python/XmlRoutines.py
+++ b/Tools/Python/XmlRoutines.py
@@ -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 ''