Can i get the code to convert Text to XML using JSp
That depends upon precisely what you want to do, but generally yes, it's a fairly straightforward process to convert text to XML using here is a reference site touching on the topic you requested:
http://www.devsphere.com/xml/taglib/process/reference.html and according to this site in reference to their XML Java Tag Library they offer as a free download, "XJTL provides several XML parsing actions (<p:parse>,
<p:element>, <p:start>, <p:end>, <p:data> and
<o:pi>) that let you build JSP pages that process XML documents
in the most natural and easiest way possible." As my Java professor used to say, "Java is not merely a programming language, it's a way of representing the entire world." That is akin to XML, which is an acronym for eXtensible Markup Language. The extensibility itself is why I answered your question cautiously above.