xsl-list
[Top] [All Lists]

[xsl] Ignore html during javascript xml parse

2006-10-05 11:32:29
if the usual javascript code

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

reads from

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

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.

cheers.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>