def _update_document_tree(<EOL>self,<EOL>oldContent=None,<EOL>newContent=None):
self.refresh<EOL>if self.parent:<EOL><INDENT>self.refresh<EOL>indentOldContent = "<STR_LIT>"<EOL>indentNewContent = "<STR_LIT>"<EOL>for l in oldContent.split("<STR_LIT:\n>"):<EOL><INDENT>indentOldContent += "<STR_LIT:\t>" + l + "<STR_LIT:\n>"<EOL><DEDENT>uoldContent = indentOldContent[:-<NUM_LIT:1>]<EOL>for l in newContent.split("<STR_LIT:\n>"):<EOL><INDENT>indentNewContent += "<STR_LIT:\t>" + l + "<STR_LIT:\n>"<EOL><DEDENT>unewContent = indentNewContent[:-<NUM_LIT:1>]<EOL>thisOldContent = self.to_string(indentLevel=<NUM_LIT:1>)<EOL>thisNewContent = thisOldContent.replace(uoldContent, unewContent)<EOL>self.content = self.to_string(<EOL>indentLevel=<NUM_LIT:0>, title=False).replace(oldContent, newContent)<EOL>self.content = self.to_string(<EOL>indentLevel=<NUM_LIT:0>, title=False).replace(oldContent, newContent)<EOL>doc = self.parent._update_document_tree(<EOL>oldContent=thisOldContent,<EOL>newContent=thisNewContent<EOL>)<EOL><DEDENT>else:<EOL><INDENT>self.content = self.content.replace(oldContent, newContent)<EOL>doc = self<EOL><DEDENT>self.refresh<EOL>return doc<EOL>
*update document tree*

        **Key Arguments:**
            - ``oldContent`` -- the old content to be replaced in parent object (user sould not need to give this)
            - ``newContent`` -- the replacement text for the parent object  (user sould not need to give this)

        **Return:**
            - ``doc`` -- the updated document object