I don't use version 8.2, but I realise that you can validate the file with an XML schema rather than (alternative to) a type tree - I assume that's what you're doing?
2 ideas on this:
1) Send it back to the client as invalid XML
2) If 1 not an option, use a type tree instead of a schema to validate the file, making the XML declaration optional.