Forum Discussion
Maurice_G_
Employee
Aug 18, 2011find an dreplace XML Value with irule
I am runnin 10.2.1.
I an having trouble with an iRule I am writing trying to parse the SSN Value out of the following POST http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://w...
Kevin_Davies_40
Nacreous
Aug 19, 2011How can I replace this with "SSN">-- regardless of the format of the ssn?
when HTTP_REQUEST_DATA {
set offset [string first {"SSN">} [HTTP::payload]]
set length [expr {$offset - [string first {<} [HTTP::payload] $offset] }]
log local0. "Offset $offset length $length"
log local0. "Replacing [HTTP::payload $offset $length]"
HTTP::payload replace $offset $length {"SSN">--}
}
Mind you there is no error checking here so you would want to add some.
Kevin (Jarvil)
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