XML : xpath 1.0 distinct items

Using xpath 1.0

I have the following xpath

  /root/Locale/Client[@id=1234]/Category/Category/Category    

Its a large xml doc.

Each category looks like this:

  <Category       id="7211"       parentID="5103"       level="4"       creatorID="1"       sortOrder="2"       createDate="2014-09-12T09:19:17"       updateDate="2016-03-30T13:42:01"       nodeName="All"       urlName="all"       path="-1,1719,3292,5103,7211"       isDoc=""       nodeType="1071"       creatorName="Suhel Ahmed"       writerName="Suhel Ahmed"       writerID="1"       template="0"       nodeTypeAlias="Category">    

Basically I need to select distinct categories at the 3rd level of categories where the distinct-ness is based on the nodeName.

I know in xpath 2.0 we have distinct-values but not in xpath 1. Is there a way I can do this with xpath 1.0

wing

No comments:

Post a Comment