0

I'm trying to search within XML files in a document library for a search term but i'm not getting the results.

For example if I search for 'title' or 'paragraph' it finds the file but NOT if I search for 'dave'. It's the text within Item id that I need to search for but for some reason it gets ignored. Any ideas? enter image description here

enter image description here

1 Answer 1

0

See: https://stackoverflow.com/questions/71878401/ms365-power-automate-online-how-to-get-xml-attribute-values-for-a-particular-te

Try using xPath xpath(xml(item()), 'string(/category/@wow:rank)') this will loop through each item and get the attribute value.

4
  • Hi Martin, Thanks for responding. I did try using various xpath commands but as the ID i'm after is before the first element it won't pick it up. I've now used what seems like an unnecessarily long process of collecting the file content of all xml files in a library, searching within that for the text and reporting back the results to the app. This is causing timeout issues due to the amount of files in some libraries.
    – Dave G
    Commented Jan 8 at 18:20
  • In xPath you could use an expression like /*[name()="ns:StockFile"]/*[name()="ns:StockHeader"]/*[name()="ns:EndDate"] to target specific elements. Every action in Power Automate has timeout settings which you can use to increase the timeout duration. You can adjust these settings to allow your flow more time to process the large number of files. If your flow is still timing out, you might need to split it into multiple flows. learn.microsoft.com/en-us/troubleshoot/power-platform/… Commented Jan 8 at 18:44
  • Thanks Martin. I'm afraid that expression doesn't mean much to me as i'm not that familiar with it but thanks for replying. I've added time out settings to each of the SharePoint actions in the flow but will see if it needs applying to compose actions etc.
    – Dave G
    Commented Jan 8 at 19:23
  • Ok sounds good give that a try and let me know if that fixes things for you. Commented Jan 8 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.