carregar XML no DB


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ++++++++++++++++++++++++++++++++++++++++++++++++
  2. Salvar dados do XML no DB usado Javascript (HTML)
  3. ++++++++++++++++++++++++++++++++++++++++++++++++
  4.  
  5. <script type="text/javascript">
  6. function enviar() {
  7. var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
  8. xmlDoc.async = false;
  9. //xmlDoc.load("http://intranet/xml/teste.xml");
  10. xmlDoc.loadXML("<?xml version='1.0' encoding='ISO-8859-1'?>" +
  11. "<RAIZ><PARA>Jorge Luiz Gonçalvez de Moura</PARA></RAIZ>")
  12. alert(xmlDoc.xml);
  13.  
  14. var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  15. xmlHttp.open("POST", "http://intranet/teste/enviarXMLtoServer.asp", false);
  16. xmlHttp.send(xmlDoc);
  17. alert(xmlHttp.responseText);
  18. }
  19.  
  20. </script>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.