I do : "item.@type" and I need to check and if attribute
type is not there throw error, but seems like "item.@type" never
returns null,if there is no "type" attribute specified, it returns
some kind of empty xml or something, is there any particular reason
why this is done this way? and most importantly what is the easiest
way to check if xml node has attribute "type" defined ?