How to use the xiblint.xmlutils.parse_xml function in xiblint

To help you get started, we’ve selected a few xiblint examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lyft / xiblint / xiblint / xibcontext.py View on Github external
def __init__(self, path):
        self.path = path
        self.success = True
        self.errors = []
        try:
            self.tree = parse_xml(path)
        except ElementTree.ParseError as ex:
            self.tree = None
            self.errors.append({
                'file': self.path,
                'line': ex.position[0],
                'error': ex.msg,
            })
        self.rule_name = None