You can do this via regex or xpath, depending on the complexity of the xml. If you want to use regular expressions, you'd probably want to do something like this: