Hi,
When I use set XML element value, I am getting the error "Xpath expression returned no element". Please refer to the screenshots.
and the xml code:
I want to set the value for attribute "Id", but getting the error. Please help.
After removing the namespace xmlns it is working so definitely that is obstructing the xpath.
https://codebeautify.org/Xpath-Tester
Looks like there are some ways to bypass it
https://stackoverflow.com/questions/5239685/xml-namespace-breaking-my-xpath
https://stackoverflow.com/questions/4440451/how-to-ignore-namespaces-with-xpath
If you are not able to get the right way by doing a web search for this, then you could think of replacing the xmlns with a blank string and then set the new element value and then put back the xmlns. Just a thought.
Below is a sample using the XPath function.
/*[name()='Offering' and namespace-uri()='http://hogehoge.com/ns']/*[name()='OfferInXml']/*[name()='Data']/*[name()='Offer' and namespace-uri()='urn:nms:offer']/*[name()='Metadata']/*[name()='Id']
Hi, It worked! thanks
and may I know is it possible to get more attributes at once, for example under a particular tag, I need to extract all the tags value.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.