Javascript examples for jQuery:XML
Output valid xml with jquery.html() using XMLSerializer
<html> <head> <meta name="viewport" content="width=device-width"> </head> /*from ww w . j a v a2 s . com*/ <body> <div id="test"> <p data-test=" "> Foo bar </p> <script src="https://code.jquery.com/jquery-3.1.0.js"></script> </div> <script> var s = new XMLSerializer(); var d = document; var str = s.serializeToString(d); console.log(str) </script> </body> </html>