/*[local-name()="lists"]/*[local-name()="list"]/*[local-name()="name" and text()="*Billable"]/..
allows to select all 'lists' named elements at root level without consideration for namespace. Beware many online XPath test tools will ignore the input XML document namespace, while .NET, and Logic Apps XPath function built with .NET, honor the namespace. So for a node to match with just
it needs to be
with no namespace assigned. Beware children nodes inherit default namespaces assign by their parents (
/*[local-name()="name" and text()="*Billable"]
lets you select all the name nodes where the name value is '*Billable'. It is typical to want to select elements from an XML array which have specific value for a child node or attribute. This demonstrate selecting the name nodes equal to *Billable.
lets you go back to the parent node of the name node, so you are able to list all the 'list' elements which satisfied the condition on their leave nodes (has a name element of value *Billable).