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)
| 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 | """ |
no outgoing calls
no test coverage detected