#!/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
"""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 ''