tags:

views:

74

answers:

2

HI,

I have some string from XML file, and I I want to replace all "& lt;, and & gt;" ... in "< and '>"

this is the AJAX call (jQuery):

$.ajax({
        type: "GET",
        url: "xml.xml",
        dataType: "html",
        success: function(xml) {


            alert(xml);

            $(xml).find('reslult').each(function(){
                            var bid = $(this).find('bid').text();
                            $('.Sign2').text(bid);
            });
            }
        });

I can't use "DataType:XML", because XML file is beginning with ..... :(

Thanks !

+2  A: 
ocdcoder
A: 

Can't you just use the javascript unescape() function on the string?

mdm20
no, thats not for encode/decode special html characters, its for uri characters...for example, a space " " escapes to "%20"
ocdcoder