XPath to last distinct node of several

November 2nd, 2006
geek No comments Leave a comment

To return the last nodes in a set with distinct names…

/foo/*[not( name()=name(following-sibling::*) )]

eg:





Returns the lattermost and nodes.

  1. No comments yet.
  1. No trackbacks yet.