I have a big problem. I want to extract text from html table that contains input tags, raw text, link tags etc. and display in a new window clean html table with only text.
SAMPLE INPUT
<TABLE id="test">
<TBODY>
<TR>
<TD>TEXT 1</TD>
<TD><a href="/questions">TEXT 2</a></TD>
<TD><input type="text" value="TEXT 3" ></TD>
</TR>
</TBODY>
</TABLE>
magic things(script) happen(parse) here(this)
OUTPUT
<TABLE id="test">
<TBODY>
<TR>
<TD>TEXT 1</TD>
<TD>TEXT 2</TD>
<TD>TEXT 3</TD>
</TR>
</TBODY>
</TABLE>
I searched almost everywhere and i cannot get it to work.
I need this functionality for copy paste.
Any Help.
Thank you @artlung
Based on your sample i prepared complete solution
(copy paste to html file)
And im asking for reviewing this, maybe it can be done better?
Complete problem:
1.Transform HTML table with inputs,anchor, text to new CLEAN Html table with only text
2.Create new window and transfer prepared Table
SOLUTION: