Writing reliable interrogation scripts with the XML parser

I was wonder how to reliably handle interrogation with the XML parser without accidentally write the wrong vendor on a device:


Is it acceptable to do something like this? When parsing for metrics I believe it's not (unless using _optional?), but what about interrogation?


Since the forum seems to send all white-space down a black hole, please check out my branch here:


https://bitbucket.org/indeni/indeni-knowledge/branch/IKP-995-blue-coat-interrogation-fix?dest=staging#diff


/Patrik