M
mark4asp
I have an element, report which contains tags which have been
transformed. E.g. <p> is <p>
<myXml>
<report>This text has html tags in it.<p> which but <> has been
changed to <></report>
</myXml>
I there a way that the XSLT transformation can render the content as
html rather than text?
PS: I tried to cludge this by getting the xmlDOM, then using javascript
to get the the <report> text but this just gives inconsistent results
(sometimes the <report> displays and other times I get an error telling
me that the expected item is null.
var reportTxt = getNodeText(oXmlDom.getElementsByTagName('report'));
a watch on oXmlDom.getElementsByTagName('report') shows the item is
there.
a watch on reportTxt shows no item (= null).
It's not the getNodeText() because when I do:
var reportNode = oXmlDom.getElementsByTagName('report');
I get the same, a watch on oXmlDom.getElementsByTagName('report') shows
the node is there; a watch on reportNode shows no node present.
This is just a crazy error which I can't debug.
On balance, I prefer the XSLT transform if possible.
transformed. E.g. <p> is <p>
<myXml>
<report>This text has html tags in it.<p> which but <> has been
changed to <></report>
</myXml>
I there a way that the XSLT transformation can render the content as
html rather than text?
PS: I tried to cludge this by getting the xmlDOM, then using javascript
to get the the <report> text but this just gives inconsistent results
(sometimes the <report> displays and other times I get an error telling
me that the expected item is null.
var reportTxt = getNodeText(oXmlDom.getElementsByTagName('report'));
a watch on oXmlDom.getElementsByTagName('report') shows the item is
there.
a watch on reportTxt shows no item (= null).
It's not the getNodeText() because when I do:
var reportNode = oXmlDom.getElementsByTagName('report');
I get the same, a watch on oXmlDom.getElementsByTagName('report') shows
the node is there; a watch on reportNode shows no node present.
This is just a crazy error which I can't debug.
On balance, I prefer the XSLT transform if possible.