javascript - Convert an xml node to string -



javascript - Convert an xml node to string -

i'm getting xml reply server using jquery , need have 1 of kid nodes string farther work it. here code:

class="lang-js prettyprint-override">function pollserver(dataobject) { $.ajax({ type: "post", url: '/server.php', data: dataobject, success: function (data) { $xmldoc = $(data); $listen = $xmldoc.find('listen'); console.log($listen); }, datatype: 'xml' }); }

i tried using (new xmlserializer()).serializetostring(listen) gives me empty string.

the next should work fine xml:

var hear = $("listen", data)[0].outerhtml;

javascript xml

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -