Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find errors in a XML file?

Sometimes when I'm trying to run my code, the Eclipse console says:

Error in an XML file: aborting build.

That means that I have a mistake in my main XML file. Is there any way to find my mistake without making guesses and erasing some XML code in order to see where the problem is? Something like validation of my XML file! Thanks.

like image 889
menu_on_top Avatar asked Nov 26 '10 20:11

menu_on_top


2 Answers

XML Tools, a plugin for Notepad++ allows you to check if the XML syntax is broken and tells you on what line the error is.

To install the XML tools plugin, download the plugin zip file, and extract the contents to where you have installed Notepad++ (such as C:\Program Files\Notepad++). Then restart Notepad++, open the XML file you wish to check, click on the "Plugins" menu at the top, select "XML Tools" and click on "Check XML syntax now."

Hope that helps.

like image 73
TookTheRook Avatar answered Oct 04 '22 06:10

TookTheRook


You could even open it in firefox, and if it is malformed it will show you where the error lies.

like image 37
Gabriele Petrioli Avatar answered Oct 04 '22 05:10

Gabriele Petrioli