Re: [xsl] Ignore html during javascript xml parse

Subject: Re: [xsl] Ignore html during javascript xml parse
From: Robert Koberg <rob@xxxxxxxxxx>
Date: Thu, 05 Oct 2006 14:44:57 -0400
What problem are you having with XSL?

Ted G. wrote:
if the usual javascript code

    req = new XMLHttpRequest();
    response  = req.responseXML.documentElement;
    method    = response.getElementsByTagName('method')[0];
    result    = response.getElementsByTagName('result')[0];

reads from

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <result>I want <b>this</b> and this and <i>this<i></result>

How can I make it provide:

    method = mymethod
    result = I want <b>this</b> and this and <i>this<i>

ie how do I ignore html tags? I would prefer not to change "<", ">" etc into their codes.

I have tried some xsl templates but they break the script; responseXML.documentElement seems to choke on them.


Current Thread