2 Replies Latest reply on Mar 2, 2008 1:56 PM by levancho

    best way to ckeck xml objects attribute existance

    levancho Level 3
      I have xml node <mynode type='sometype" > ....

      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 ?

      thanks in advance