Returns a list of all variables in this OvalDocument where each list item is of type OvalVariable Returns None if no variables could be found @rtype: List @return: All variables in the OVAL document or None if none were found
(self)
| 401 | return [OvalState(element) for element in element_list] |
| 402 | |
| 403 | def getVariables(self): |
| 404 | """ |
| 405 | Returns a list of all variables in this OvalDocument where each list item is of type OvalVariable |
| 406 | Returns None if no variables could be found |
| 407 | |
| 408 | @rtype: List |
| 409 | @return: All variables in the OVAL document or None if none were found |
| 410 | """ |
| 411 | root = self.getDocumentRoot() |
| 412 | if not root: |
| 413 | return None |
| 414 | |
| 415 | varroot = root.find("def:variables", OvalDocument.NS_DEFAULT) |
| 416 | |
| 417 | if varroot is None: |
| 418 | return None |
| 419 | |
| 420 | element_list = list(varroot) |
| 421 | if not element_list: |
| 422 | return None |
| 423 | |
| 424 | return [OvalVariable(element) for element in element_list] |
| 425 | |
| 426 | def getElementByID(self, ovalid): |
| 427 | """ |
no test coverage detected