]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Python/XmlRoutines.py
Add dependency checking to the Far install.
[mirror_edk2.git] / Tools / Python / XmlRoutines.py
index 0345f4acc645bc6fc533a0c3aa2aa3c682dbff5b..1757ea019cf289ae0a8dfd2b2d1a06080e465bff 100755 (executable)
@@ -73,6 +73,13 @@ def XmlParseFile (FileName):
   except:
     return xml.dom.minidom.parseString('<empty/>')
 
+def XmlParseString (Str):
+  """Parse an XML string into a DOM and return the DOM."""
+  try:
+    return xml.dom.minidom.parseString(Str)
+  except:
+    return xml.dom.minidom.parseString('<empty/>')
+
 def XmlParseFileSection (FileName, Tag):
   """Parse a section of an XML file into a DOM(Document Object Model) and return the DOM."""
   try: