summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
diff options
context:
space:
mode:
authorPierre Gondois <pierre.gondois@arm.com>2025-04-30 15:35:54 +0300
committerLiming Gao <gaoliming@byosoft.com.cn>2025-07-01 04:51:38 +0300
commit7402bd06cfa88a93a416a1edff7e7f9283ee18ed (patch)
tree29b1fb4d788b74b347433346a7d23d7428a4c52f /BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
parentc6e088cafcf3f7fe056e94480d3e5673498c7f91 (diff)
downloadedk2-7402bd06cfa88a93a416a1edff7e7f9283ee18ed.tar.xz
BaseTools: Ecc: Remove unnecessary code
Running the vulture tool on the Ecc folder gave the following report. Remove the unnecessary code. - Ecc/c.py:52: unused function 'GetConfig' (60% confidence) - Ecc/c.py:484: unused function 'GetFileModificationTimeFromDB' (60% confidence) - Ecc/CodeFragmentCollector.py:77: unused attribute '__Token' (60% confidence) - Ecc/CodeFragmentCollector.py:78: unused attribute '__SkippedChars' (60% confidence) - Ecc/CodeFragmentCollector.py:109: unused method '__EndOfLine' (60% confidence) - Ecc/CodeFragmentCollector.py:134: unused method '__UndoOneChar' (60% confidence) - Ecc/CodeFragmentCollector.py:221: unused method '__InsertComma' (60% confidence) - Ecc/CodeFragmentCollector.py:539: unused method 'PrintFragments' (60% confidence) - Ecc/Database.py:81: unused attribute 'text_factory' (60% confidence) - Ecc/Database.py:214: unused method 'UpdateIdentifierBelongsToFunction_disabled' (60% confidence) - Ecc/MetaFileWorkspace/MetaDataTable.py:142: unused method 'IsIntegral' (60% confidence) - Ecc/MetaFileWorkspace/MetaDataTable.py:205: unused method 'GetCrossIndex' (60% confidence) - Ecc/Xml/XmlRoutines.py:145: unused function 'XmlElementData' (60% confidence) - Ecc/Xml/XmlRoutines.py:162: unused function 'XmlElementList' (60% confidence) - Ecc/Xml/XmlRoutines.py:192: unused function 'XmlNodeName' (60% confidence) Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
Diffstat (limited to 'BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py')
-rw-r--r--BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
index b02f663b15..1428afef6d 100644
--- a/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
+++ b/BaseTools/Source/Python/Ecc/Xml/XmlRoutines.py
@@ -132,37 +132,6 @@ def XmlElement(Dom, String):
except:
return ""
-
-## Get a single XML element of the current node.
-#
-# Return a single XML element specified by the current root Dom.
-# If the input Dom is not valid, then an empty string is returned.
-#
-# @param Dom The root XML DOM object.
-#
-# @revel Element An XML element in current root Dom.
-#
-def XmlElementData(Dom):
- try:
- return Dom.firstChild.data.strip()
- except:
- return ""
-
-
-## Get a list of XML elements using XPath style syntax.
-#
-# Return a list of XML elements from the root Dom specified by XPath String.
-# If the input Dom or String is not valid, then an empty list is returned.
-#
-# @param Dom The root XML DOM object.
-# @param String A XPath style path.
-#
-# @revel Elements A list of XML elements matching XPath style Sting.
-#
-def XmlElementList(Dom, String):
- return map(XmlElementData, XmlList(Dom, String))
-
-
## Get the XML attribute of the current node.
#
# Return a single XML attribute named Attribute from the current root Dom.
@@ -179,22 +148,6 @@ def XmlAttribute(Dom, Attribute):
except:
return ''
-
-## Get the XML node name of the current node.
-#
-# Return a single XML node name from the current root Dom.
-# If the input Dom is not valid, then an empty string is returned.
-#
-# @param Dom The root XML DOM object.
-#
-# @revel Element A single XML element matching XPath style Sting.
-#
-def XmlNodeName(Dom):
- try:
- return Dom.nodeName.strip()
- except:
- return ''
-
## Parse an XML file.
#
# Parse the input XML file named FileName and return a XML DOM it stands for.