non ti basta autenticare l xml generato con l xml schema ?

tipo con http://xmlsoft.org/xmllint.html

xmllint --schema