I have a XML read into a one single String. I need to get all the data inside <code> tags. I do not need to go though whole XML file parsing them. Can i use a simple string processing technique to get the data inside those tags.
input : <a><b><code>Hello</code></b><code>World</code></a>
output : Hello, World
Regex is not an advisable tool to play with XML, specially when there are sophiticated many parsers are there. You may use
javax.xml.xpathpackage to do this stuff for you like:will result