159
161
'Parsing submission %s: %s' % (self.submission_key, message))
161
171
def _getValidatedEtree(self, submission, submission_key):
162
172
"""Create an etree doc from the XML string submission and validate it.
164
174
:return: an `lxml.etree` instance representation of a valid
165
175
submission or None for invalid submissions.
168
179
tree = etree.parse(StringIO(submission), parser=self.doc_parser)
169
180
except SyntaxError, error_value: