xml - XSLT - Search for last element in a group -



xml - XSLT - Search for last element in a group -

i iterating on grouping of elements , while iterating need access info lastly node set.

for example, have test goes out level1 elements, while getting values current node set, check , see if there multiple elements contain same grouping number, , if need access info lastly node set contains grouping number 3.

<root> <level1> <group>1</group> <name>test1</name> <email>test@email.com</email> </level1> <level1> <group>3</group> <name>test2</name> <email>test2@email.com</email> </level1> <level1> <group>3</group> <name>test3</name> <email>test3@email.com</email> <manager>manager@email.com</email> </level1> </root>

i have tried next out root level check see if grouping exists , lastly node set contains specific group.

../../level1/group = ./group ./group = ../../level1/group ./group = ../../level1/group[1][last()]

if want locate lastly tag grouping 3, can following:

root/level1[group = 3][position() = last()]

xml xslt

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -