Share via

Word error XML END TAG - Problem solved

Anonymous
2012-06-04T22:25:15+00:00

I have huge problem. I`ve tried to save a document and is not opening any more. The error message is "the name in the end tag of the element must match the element type in the start tag. Location: Part:/word/document.xml, Line:2, Column 8245345". I unziped the document, I founded the document.xml. I couldn't figure how to solve this problem. I am working since 3 month for this document. I can not loose everytinhg. Can someone help me urgently? tomorrow I have the dead line. I uploaded the document at http://dl.transfer.ro/transfer\_ro-05jun-a1b37883188.zip

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2012-06-05T06:23:08+00:00

I did it! I hand fix the problem. There is a XML Marker 2.1 which indicate you where are the errors and just have to try the options to replace the tags and to complete the syntax.

Thank you for suggestions.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

12 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-06-05T05:21:43+00:00

    Thank you for your suggestions. Unfortunately none of the solution worked. The last chance is the hand fix. Ive tried that too but I dont realy know how to do it.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2012-06-05T02:27:39+00:00

    I just ran the 2528942 - FIX IT on a download of your file and it didn't work. So now you will have to depend on a manual hand coding fix.

    I hope MS is listening to this problem. It is happening frequently and when it happens, most of the time it is on time sensitive documents. The impact to the user is severe. They are massively pissed. It is the sort of problem that will make them a lifetime MS Enemy. Someone who will actively drive business away from Office every chance they get.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2012-06-05T02:16:13+00:00

    As Charles pointed out, this is a common problem. There are a few people on the list who hand fix files. But, they must recognize the question so you MUST edit your subject line, add the words 'XML END TAG error' to it.

    Possible fix:

    Tony Jolans was the first that I heard of with a tool to fix the problem. Now MS has released a Fix It for one specific variation of the problem.

    If the tools don’t fix your problem, the file will have to be fixed manually, repairing the tag order.

    The Fix It article notes that the document is still in a fragile state. You have to do some addition fixing to avoid repeats of the problem.

    https://blogs.technet.com/b/wordonenotesupport/archive/2011/03/24/error-when-opening-a-word-2007-or-2010-document.aspx

    http://support.microsoft.com/kb/2528942 - FIX IT

    This fix it will work for one specific tag error where there are equations and graphics in the same paragraph AND Office 2010 SP1 has not been applied.

    Let me fix it myself

    If you are familiar with editing XML, you can try to fix the problem yourself by correcting the sequence of the mismatched oMath tags in the document. See the following example:

    Incorrect tags:

    <mc:AlternateContent>

    <mc:Choice Requires=”wps”>

    <m:oMath>

    </mc:AlternateContent>

    </m:oMath>

    Correct tags:

    <m:oMath>

    <mc:AlternateContent>

    <mc:Choice Requires=”wps”>

    </mc:AlternateContent>

    </m:oMath>

    Note: You will have to use an application such as Notepad to edit the XML.

    Further Fixes

    The Fix it solution in this article should let you recover your Word document. However, the symptoms will reappear when you make any further edits to the document unless the core problem in the structure of the document is resolved.

    To try to correct the core problem, follow one of these workarounds:

    Install Office 2010 Service Pack 1

    Office 2010 Service Pack 1 resolves this issue for new files. It will also prevent the problem from recurring with any files that were recovered with the Fix it solution in this article.

    To download Office 2010 Service Pack 1, follow the steps provided in this Microsoft knowledge base article:

    2460049 - Description of Office 2010 SP1

    Grouping Objects

    The steps provided work best under Word 2010:

    1. After you open the recovered document, turn on the Selection pane. This can be found in the Home tab of the ribbon. The editing group of the Home tab has a dropdown button named Select.
    2. Click the Select button, and then click Selection Pane...
    3. Press the Ctrl button on your keyboard and then click each text box in the selection pane.
    4. Click the Group button under the Format tab. This will group all the objects together.
    5. As soon as you have all objects grouped on each page, save the document under a new name.

    Save the document in the .RTF file format

    The steps provided work for both Word 2007 and Word 2010:

    1. After you open the recovered document, click File and select Save (for Word 2007 click the Office button and select Save As)
    2. In the Save As dialog box, click "Save as type:" dropdown and select Rich Text format (*.rtf).
    3. Click Save.

    Click to view this blog for more information about this issue.

    Tony Jolan’s Automatic Fix:

    1. Download  http://www.wordarticles.com/temp/Rebuilder.dotm Microsoft Office Word Macro-Enabled Template (.dotm) and open it.
    2. Click Options button on the Security warning and select Enable this content.
    3. http://xfprpw.blu.livefilestore.com/y1pwRE3ELG_o830OxtH-mAomTC4zwDe5r1q2ZKqlMk47BxJ-8Gy5TE4Dh85LeEArzqfhxpIEb0d3PfmSkR5pUWZ1F_AEUd_qLug/Rebuilder_Security_Warning.PNG?psid=1
    4. Click the Broken Documents tab at the far right of the ribbon.
    5. http://xfprpw.blu.livefilestore.com/y1paXB9ScOFIzGIk3ET8QxaiIeijJh-6DE_pAWEqCdD_fiW-5Hp5tTdKf4N7AB5GzO2uZ0jPk_Ig1ttMh8Plx0moG8MuKsk-cMN/Rebuilder_Broken_Documents.PNG?psid=1
    6. Click the Rebuild button in the left-hand side
    7. http://xfprpw.blu.livefilestore.com/y1p_zbO6cnAMo2zsd_muwehEZ1m94zD3OamnwKrkIE4q6_PSeYtptT8OrJGiSd6hcYo2qalpsjuntorEIIJ-lCgOb_Y7uBCyEdw/Rebuilder_Rebuild.png?psid=1
    8. Locate and open your corrupt document in the file open dialog.

    That's it. The process will repair your document if possible and create a new document with *(Rebuilt)*appended to the filename. Be patient as it may take a few minutes. If a repair is not possible, you can then post to a public file area and someone here can attempt a manual repair.


    Manual Fix

    Notepad ++ is a good, free editor for this type of task

    ·         Make a copy of the file

    ·         Rename the copy from DOCX to ZIP

    ·         Open … .ZIP/word/document.xml in notepad

    ·         Copy the contents of the file to clipboard

    ·         Open Word

    ·         Paste a copy of the copied XML into Word

    ·         (optional) the XML is one long string too hard to read, you can replace some tags, with that tag plus a para mark to break up the text to make it more people readable.

    ·         Open an XML validator, ie this site on the internet: http://www.w3schools.com/xml/xml_validator.asp

    ·         Paste another copy of the XML into the “Syntax Check Your XML” input window

    ·         Click on “validate” button

    ·         Copy the missing tag, ie </mc:Fallback>  (yours will be different)

    ·         Return to word Find: mc:Fallback>  (without the </ so you find both open and closing tags).  Repeat find until you hit 2 open tags in a row.  Then you just have to figure out where to put the closing tag between them.  Look for other tags before and after a proper closing tag so you can match the problem area to a good area.

    Was this answer helpful?

    0 comments No comments
  4. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    2012-06-05T01:44:37+00:00

    Search this forum for "end tag must match"

    This is a common problem and there are a number of answers.

    Was this answer helpful?

    0 comments No comments