def __init__(self, filename):
<EOL>if filename is not None and os.path.dirname(filename) == '<STR_LIT>':<EOL><INDENT>self.original_filename = os.path.join(os.getcwd(), filename)<EOL><DEDENT>else:<EOL><INDENT>self.original_filename = filename<EOL><DEDENT>if filename is not None:<EOL><INDENT>self.tree = etree.parse(filename)<EOL><DEDENT>else:<EOL><INDENT>self.tree = etree.ElementTree(Element('<STR_LIT>'))<EOL><DEDENT>self.root = self.tree.getroot()<EOL>
A container for a DOM-style SVG document.

        The `Document` class provides a simple interface to modify and analyze 
        the path elements in a DOM-style document.  The DOM-style document is 
        parsed into an ElementTree object (stored in the `tree` attribute).

        This class provides functions for extracting SVG data into Path objects.
        The Path output objects will be transformed based on their parent groups.

        Args:
            filename (str): The filename of the DOM-style object.