MCPcopy Index your code
hub / github.com/aboutcode-org/vulnerablecode / getDocumentRoot

Method getDocumentRoot

vulnerabilities/lib_oval.py:265–276  ·  view source on GitHub ↗

Returns the root element of the XML tree if one has been loaded. Otherwise, returns None @rtype: Element @return: The root Element of the OVAL document, or None

(self)

Source from the content-addressed store, hash-verified

263 return ElementTree.tostring(root, "UTF-8", "xml").decode("utf-8")
264
265 def getDocumentRoot(self):
266 """
267 Returns the root element of the XML tree if one has been loaded.
268 Otherwise, returns None
269
270 @rtype: Element
271 @return: The root Element of the OVAL document, or None
272 """
273 if not self.tree:
274 return None
275
276 return self.tree.getroot()
277
278 def getGenerator(self, create=False):
279 """

Callers 7

getGeneratorMethod · 0.95
getDefinitionsMethod · 0.95
getTestsMethod · 0.95
getObjectsMethod · 0.95
getStatesMethod · 0.95
getVariablesMethod · 0.95
getElementByIDMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected