Question: So I have a servlet which prints content of various files. But when I want to print .xml file my servlet page doesn't print anything, because page uses this xml tags as html and is parsing them istead of printing. And I want to print this tags. I am reading file line by line and lines are stored in variable line.

Answer: 
can you call JS from Delphi ? 

<http://www.delphidabbler.com/articles?article=21>

<http://jansfreeware.com/articles/delphi-ie-javascript.html>

<http://www.programmersheaven.com/article/12946-How+to+call+JavaScript+functions+in+a+TWebBrowser+from+Delphi/info.aspx>

---

probably there should be way

<http://www.roseindia.net/javascript/javascript-click-method.shtml>

---

To locate the control DOM Object you may try collections such as GetXXXByName or libraries like jQuery or custom JS code.

however that is the question on Internet Epxlorer + JavaScript, not on Delphi.
No need for javascript as Arioch implies.
You can have access to the complete DOM via TWebBrowser.Document.
There are many resources on the net on this subject, this is the most complete one:

<http://www.cryer.co.uk/brian/delphi/twebbrowser/read_write_form_elements.htm>

if you look around on SO you also will find some [snippets](https://stackoverflow.com/a/11454482/800214).