Forum Discussion
No matches under XML_CONTENT_BASED_ROUTING
- Dec 08, 2022
Hi akhmarov,
just wanted to get sure... 😉
Try to format your xpath-query case-sensitive... 😉
//m:GetFolder/*Cheers, Kai
You're welcome!
Cheers, Kai
Kai, may I ask you how to construct XPath query to find each node starting with "m:"?
<m:GetFolder xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:FolderShape>
...
</m:FolderShape>
<m:FolderIds>
...
</m:FolderIds>
</m:GetFolder>I need to extract "GetFolder", "FolderShape" and "FolderIds" with their properties
- Vladimir_AkhmarovDec 08, 2022
Cirrus
Seems that the answer to my question should be "NO" because paragraph Writing XPath queries from https://techdocs.f5.com/en-us/bigip-15-0-0/big-ip-local-traffic-manager-implementations/routing-based-on-xml-content.html#GUID-CB96E40C-6AA4-4B0F-A8A4-3A131BC10BB1 states 4. Write queries to match elements and attributes
To catch something like GetFolder from my original XML example I tied to use:
local-name(//soap:Body/m:*) name(//soap:Body/m:*) //soap:Body/m:*But the last XPath query was the only match found in logs
So I must consider that XML_CONTENT_BASED_ROUTING event cannot be used for XML node names extraction
Any help appreciated 🙂
- Kai_WilkeDec 08, 2022
MVP
Hi ahkmarov,
i used XPath expression tools in the past to write my queries. It helps a lot...
Free Online XPath Tester / Evaluator - FreeFormatter.com
You may change your queries to... (use both)
//m:GetFolder/m:FolderIds/* //m:GetFolder/m:FolderShape/*The XML and iRule you've provided would output this...
<XML_CONTENT_BASED_ROUTING>: //m:GetFolder/m:FolderShape/* = IdOnly <XML_CONTENT_BASED_ROUTING>: //m:GetFolder/m:FolderIds/* =Cheers, Kai
- Vladimir_AkhmarovDec 08, 2022
Cirrus
Thanks!
I used http://xpather.com/ for tests
My issue is that I do not know exact XML node names, like GetFolder or FolderShape. I would like to iterate SOAP body and receive node names to analyze them
- Kai_WilkeDec 08, 2022
MVP
So you need to check for yet unknown included node names other than GetFoler and FolderShape?
Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com