Forum Discussion
Ketan_B_343278
Nimbostratus
Oct 09, 2018irule for xml content based parsing
Hi,
I need help for creating an irule.
Requirement:
1. Content type should be content-type: text/xml
2. When a user hits a URL with request it should land the request on ABC servers, and...
PeteWhite
Employee
Oct 09, 2018You need to apply an XML profile in which you specify the XPath that you are looking for, then use an iRule to perform the pool assignment based on that. The $XML_count, $XML_values etc are created by the XML profile and contain the details of the matched XML elements.
Use this for guidance: https://support.f5.com/kb/en-us/products/big-ip_ltm/manuals/product/ltm-implementations-11-2-0/3.html
when XML_CONTENT_BASED_ROUTING {
for {set i 0} { $i < $XML_count } {incr i} {
log local0. $XML_queries($i)
log local0. $XML_values($i)
if {($XML_queries($i) contains "FinanceObject")} {
pool finance_pool
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects
