Forum How do I...?

Commented out text in XML..

Balaa
Hi,

How to display the commented out text in prince XML. I have tried with prince-text-replace property, no result in output PDF.

<p><!--<labeltext>*</labeltext>--><b>Correspondence</b></p>

body {
prince-text-replace: "<!--<labeltext>" "<label>"
"</labeltext>-->" "</label>";
}

Any idea on this. I'm trying with JavaScript.
mikeday
You can't, commented out text will not be found in the DOM at the moment.
nobdy
Is there any way I can keep commented out text from being removed from the DOM? Because I want to do something with them after the DOM has been loaded, for example in the window.onload.
mikeday
Not yet I'm afraid. Perhaps you could put the comment text in an element instead with "display: none"?

(Or an attribute, that would also work).