Search code examples
androidxmlandroid-xml

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.


Solution

  • 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.