How to get query result to html instead of plain text?
TangMonk opened this issue · 2 comments
TangMonk commented
If I using following code to extract title in td in the html content:
for td in process(FileContent, '//td') do
WriteLn(td.toString);
It return plain text inside td, I wanna it return html code inside td instead of inner text
Like that:
td.toString
should be:
<td><p>hello <b>this</b> is td1</p></td>
instead of:
hello this is td1
benibela commented
You can use the function outer-html in the query, i.e. //td/outer-html()
Or do it in Pascal, with .toNode.outerHTML
rather than .toString
TangMonk commented
Thanks!