public void Init()
        {
            originalXml =
                "<root>\r\n" +
                "\t<child>\r\n" +
                "\t</child>\r\n" +
                "</root>";

            textEditor = new MockTextEditor();
            textEditor.OptionsConvertTabsToSpaces = false;
            textEditor.OptionsIndentationSize     = 4;
            textEditor.OptionsIndentationString   = "\t";

            document = textEditor.Document;

            textEditor.Document.Text = originalXml;

            // Replace the <child> element
            WixDocumentEditor editor = new WixDocumentEditor(textEditor);

            string xmlToInsert =
                "<new-child>\r\n" +
                "</new-child>";

            int line    = 2;
            int column  = 2;
            int endLine = 3;

            // End column is the column containing the '>' of the </child> element.
            int endColumn = 9;

            var region = new DomRegion(line, column, endLine, endColumn);

            WixDocumentLineSegment lineSegment = WixDocumentLineSegment.ConvertRegionToSegment(textEditor.Document, region);

            initialDocumentRegionText = textEditor.Document.GetText(lineSegment.Offset, lineSegment.Length);

            editor.Replace(region, xmlToInsert);
        }