summaryrefslogtreecommitdiff
path: root/libmat/mat.py
diff options
context:
space:
mode:
Diffstat (limited to 'libmat/mat.py')
-rw-r--r--libmat/mat.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmat/mat.py b/libmat/mat.py
index e84c717..d397334 100644
--- a/libmat/mat.py
+++ b/libmat/mat.py
@@ -84,6 +84,8 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
84 84
85 def startElement(self, name, attrs): 85 def startElement(self, name, attrs):
86 """ Called when entering into xml tag 86 """ Called when entering into xml tag
87 :param attrs: Attributes of the `nam` xml tag
88 :param name: Name of the xml tag
87 """ 89 """
88 self.between = True 90 self.between = True
89 self.key = name 91 self.key = name
@@ -91,6 +93,7 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
91 93
92 def endElement(self, name): 94 def endElement(self, name):
93 """ Called when exiting a xml tag 95 """ Called when exiting a xml tag
96 :param name: name of the element
94 """ 97 """
95 if name == 'format': # leaving a fileformat section 98 if name == 'format': # leaving a fileformat section
96 self.list.append(self.dict.copy()) 99 self.list.append(self.dict.copy())
@@ -102,6 +105,7 @@ class XMLParser(xml.sax.handler.ContentHandler): # pragma: no cover
102 105
103 def characters(self, characters): 106 def characters(self, characters):
104 """ Concatenate the content between opening and closing tags 107 """ Concatenate the content between opening and closing tags
108 :param characters: content of the tag
105 """ 109 """
106 if self.between: 110 if self.between:
107 self.content += characters 111 self.content += characters