/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
++++++++++++++++++++++++++++++++++++++++++++++++ Salvar dados do XML no DB usado Javascript (HTML) ++++++++++++++++++++++++++++++++++++++++++++++++ <script type="text/javascript"> function enviar() { var xmlDoc = new ActiveXObject("Msxml2.DOMDocument"); xmlDoc.async = false; //xmlDoc.load("http://intranet/xml/teste.xml"); xmlDoc.loadXML("<?xml version='1.0' encoding='ISO-8859-1'?>" + "<RAIZ><PARA>Jorge Luiz Gonçalvez de Moura</PARA></RAIZ>") alert(xmlDoc.xml); var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlHttp.open("POST", "http://intranet/teste/enviarXMLtoServer.asp", false); xmlHttp.send(xmlDoc); alert(xmlHttp.responseText); } </script>