If you’re customizing the .xsl styles for CQWP at all, you’ll pretty quickly typo a < or > or leave out a / somewhere. When this happens, you won’t be getting any help from the inevitable error message. Any and every CQWP that references your updated .xsl will suddenly be broken with out the slightest hint as to where the problem lies. Thankfully the problem is almost always caused by invalid – not well formed – xml.
SharePoint Designer to the rescue. In SPD 2010, you’ll find the Verify well-formed xml button on the edit tab when you are viewing .xml or .xsl files. Clicking this button will do wonders for locating the missing character.
If you’re still working on a SharePoint 2007 farm or just working in SPD 2007 for some reason (there are reasons), you can do a ctrl+a select all and then right click to find the Verify well-formed xml option.