Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
Im using the following xpath to select node with specific alias:
$currentPage/ancestor::*[@level = 1]// NewsandMediaContainer
is it possible to get 2 nodes with 2 different alias?
Regards'
mkariti
Hi mkariti,
Sure, you can use XPath's "name()" function to check the names:
$currentPage/ancestor::*[@level = 1]//*[@isDoc and ( name() = 'NewsandMediaContainer' or name() = 'SomethingElse' )]
Cheers, Lee.
Hi Lee,
Many thanks for your reply.
The above code gets the first node only rather than both.
Any ides?
Cheers
Ah ok, sorry - this is for the Start Node? Unfortuately there can only be a single start node.
Ok Many thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
MNTP - xpath expression get 2 nodes
Hi there,
Im using the following xpath to select node with specific alias:
$currentPage/ancestor::*[@level = 1]// NewsandMediaContainer
is it possible to get 2 nodes with 2 different alias?
Regards'
mkariti
Hi mkariti,
Sure, you can use XPath's "name()" function to check the names:
Cheers, Lee.
Hi Lee,
Many thanks for your reply.
The above code gets the first node only rather than both.
Any ides?
Cheers
mkariti
Ah ok, sorry - this is for the Start Node? Unfortuately there can only be a single start node.
Ok Many thanks.
is working on a reply...