Welcome to the JavaRanch, Rajesh.
There's several ways to do it. If the XML is neatly formatted and the data is one row per line, you can use one of the regular-expression based utilities such as sed, perl, awk or python to do the work. I did this, in fact, just yesterday. If you don't know how to use regular expressions, they're one of the most valuable things you can learn in a Linux/Unix environment.
Another alternative is to use XSL, which actually processes and parses the XML itself. Many Linux systems come with an "xsltproc" utility program that can be used. XSL code is more readable than regexes, although for me, it requires a lot of work.
A third alternative is to use an XML parsing package. There are XML parsers for Perl, Python,
Java, C and more. Java in particular has quite a few different ways to parse XML, from the simple SAX processor up to things like DOM, StaX, the Apache Digester, JAXB, and so forth.