def importRequirementsFile(importFile): parser = xml.sax.make_parser() handler = GoalsContentHandler() parser.setContentHandler(handler) parser.setEntityResolver(handler) parser.parse(importFile) return importRequirements(handler.domainProperties(), handler.goals(), handler.obstacles(), handler.requirements(), handler.countermeasures())
def importRequirementsString(buf, session_id=None): try: handler = GoalsContentHandler(session_id=session_id) xml.sax.parseString(buf, handler) return importRequirements(handler.domainProperties(), handler.goals(), handler.obstacles(), handler.requirements(), handler.countermeasures(), session_id=session_id) except xml.sax.SAXException, e: raise ARMException("Error parsing" + importFile + ": " + e.getMessage())
def importRequirementsFile(importFile, session_id=None): try: parser = xml.sax.make_parser() handler = GoalsContentHandler(session_id=session_id) parser.setContentHandler(handler) parser.setEntityResolver(handler) parser.parse(importFile) return importRequirements(handler.domainProperties(), handler.goals(), handler.obstacles(), handler.requirements(), handler.countermeasures(), session_id=session_id) except xml.sax.SAXException, e: raise ARMException("Error parsing" + importFile + ": " + e.getMessage())
def importRequirementsFile(importFile, session_id=None): parser = xml.sax.make_parser() handler = GoalsContentHandler(session_id=session_id) parser.setContentHandler(handler) parser.setEntityResolver(handler) parser.parse(importFile) return importRequirements(handler.domainProperties(),handler.goals(),handler.obstacles(),handler.requirements(),handler.countermeasures(), session_id=session_id)
def importRequirementsFile(importFile,session_id = None): try: parser = xml.sax.make_parser() handler = GoalsContentHandler(session_id = session_id) parser.setContentHandler(handler) parser.setEntityResolver(handler) parser.parse(importFile) return importRequirements(handler.domainProperties(),handler.goals(),handler.obstacles(),handler.requirements(),handler.countermeasures(),session_id = session_id) except xml.sax.SAXException, e: raise ARMException("Error parsing" + importFile + ": " + e.getMessage())