Example 2: Convert Currency
-
Convert the prices in dollars to prices in euros, add the currency as an attribute:
-
<price>$3.02</price>
-
becomes
-
<price currency="EUR">2.58</price>
-
The code will be a filter that will only update the price elements and leave everything else untouched.