The fully enpowered tool to do validation is schema: but you need to have one. If you pull xml out as a textstream or saved to a string variable, you can load it to a dom parser and apply all the xpath method to get all the attributes (such as "//@*"). Thereafter, you know all the names of all the attributes in the document; and its value and its owner... Thereby, you can write short focused validation on specific part of the document.