• Post Reply Bookmark Topic Watch Topic
  • New Topic

question - not(not

 
mary morris
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following expression:
//*[not(not(@*))]
not(@*)
returns true only for those elements that have no attributes
this part is see,
but not;
not(not (@*)) which will return true for elements that have at least one attribute
how does the not(not work ??
 
Micheal Jacob
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
//*[not(not(@*))]
As u said not(@*) will give all the elements which dont have attributes.
not(elements dont have attributes) => elements which have attributes.
so it gives all the elements which atleast have one attribute
Micheal
 
I am mighty! And this is a mighty small ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!