Yet Another Cycling Forum
General Category => The Knowledge => Ctrl-Alt-Del => Topic started by: Gattopardo on 05 November, 2018, 09:58:51 pm
-
Hello and help,
Have a docx file, opened in libraoffice and something was edited and now the file does not open in libra office but gives the reason
File format error found at
SAXParseException: '[word/document.xml line 2]: Opening and ending tag mismatch: inline line 0 and anchor
', Stream 'word/document.xml', Line 2, Column 29565(row,col).
Searching shows the problem to be in the xml file but can't seem to workout what and where the error is so I can correct the xml file so the document can be opened.
How can I link to a text file?
-
How can I link to a text file?
Pastebin. https://pastebin.com/
Viewing the XML in an editor with syntax highlighting can be helpful for spotting errors.
-
Too big for pastebin ::-)
-
All Tags have to have end tags. This (https://www.w3schools.com/xml/xml_syntax.asp) might help.
It sounds like there's a mistyped end tag. As Furan says, using an editor that formats the document highlighting tags is a good start. https://en.wikipedia.org/wiki/Comparison_of_XML_editors
-
All Tags have to have end tags. This (https://www.w3schools.com/xml/xml_syntax.asp) might help.
It sounds like there's a mistyped end tag. As Furan says, using an editor that formats the document highlighting tags is a good start. https://en.wikipedia.org/wiki/Comparison_of_XML_editors
Than you, downloaded exchanger xml and has pin pointed the fault line.
-
Ok the link is here, anyone fancy a go at sorting it as I can not get my head around it.
https://www.dropbox.com/s/tz86ys1ofqjiuzw/document.xml?dl=0
-
There are many more errors in the xml file, and can't understand how it has been corrupted. The file is part of an .docx document.
Trying to find a an xml editor that doesn't have the file in one line so I can work out what to edit as I don't think in lines.
-
Would expat help? https://libexpat.github.io/
-
On Linux (and perhaps Windows as well) you can use:
xmllint --recover somefile.xml > new.xml
to output valid XML from a broken XML file, it works by discarding the problem bits and retaining the bits that parse correctly. Use
xmllint --recover --format somefile.xml > new.xml
if you want "pretty" formating.
-
On Linux (and perhaps Windows as well) you can use:
xmllint --recover somefile.xml > new.xml
to output valid XML from a broken XML file, it works by discarding the problem bits and retaining the bits that parse correctly. Use
xmllint --recover --format somefile.xml > new.xml
if you want "pretty" formating.
Unfortunatly no linux laptop to hand, is there a way to do it in windows?
-
had a go but couldn't get it to disentangle, sorry
-
I have fixed the incorrect closing tags using my code editor but whether it will open in Open Office I do not know. The XML is Open Office by the way not docx format.
There were a couple of opening wp:inline tags with closing wp:anchor tags by the way. File in attached Dropbox link.
https://www.dropbox.com/s/tcpxbssxrc2its9/document.xml?dl=1