i am unable to figure out this. my {RESPONSE_CONTENT_TYPE} is "^text/xml".i have an xml element <cardnumber>1111-1111-1111-1111</cardnumber>. i need to find "cardnumber" and replace the value as blank like <cardnumber></cardnumber>.
cardnumber can have any credit card number,gift card number and some other number.so, length and format can vary a lot for different types of credit cards like visa,amex or gift cards.
all i see is i can replace atrribute of a tag. i could replace the value by using regular expression for different credit card number formats but i have a case there are too many formats.
is there a way i can write the outbound rule to find the xml element name and just replace that value. here is the sample outbound rule which replaces visa credit card number...
<rewrite>
<outboundRules>
<rule name="Visa" preCondition="IsXML" enabled="true" patternSyntax="ECMAScript">
<match filterByTags="None" pattern="\d{4}\-?\d{4}\-?\d{4}\-?\d{4}" />
<action type="Rewrite" value="" />
</rule>
<preConditions>
<preCondition name="IsXML">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/xml" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
appreciate any help....thanks in advance.....