Ciao....
ho questo file xml (database.xml)
codice:<?xml version="1.0" ?> <customer> <field id="001"> <value>Hege</value> <value1>1111</value1> </field> <field id="002"> <value>Refsnes</value> <value1>2222</value1> </field> <field id="003"> <value>Norway</value> <value1>3333</value1> </field> <field id="004"> <value>pippo</value> <value1>4444</value1> </field> </customer>
come faccio ad eliminare per esempio field 003 dal mio database???
ecco il listato.. dove è l'errore???
codice:<html> <head> <script type="text/javascript"> function vai() { x=xmldso.recordset cosa=x.absoluteposition title.innerHTML=cosa } function cancella() { var oggetto = new ActiveXObject("Microsoft.XMLDOM") oggetto.async = false oggetto.load("database.xml") oggetto.documentElement.removeChild(childNodes(0).childNodes(0).nodeName) alert("cancellato ") } function movenext() { x=xmldso.recordset if (x.absoluteposition < x.recordcount) { x.movenext() } } function moveprevious() { x=xmldso.recordset if (x.absoluteposition > 1) { x.moveprevious() } } </script> </head> <body onload=vai()> <xml src="database.xml" id="xmldso" async="false"></xml> Title: <span datasrc="#xmldso" datafld="ID"></span> Artist: <span datasrc="#xmldso" datafld="value"></span> Year: <span datasrc="#xmldso" datafld="value1"></span> Pos:<span id=title>ccc</span> </p> <input type="button" value="Previous CD" onclick="moveprevious();vai()" /> <input type="button" value="Next CD" onclick="movenext();vai()" /> <input type="button" value="Delete" onclick="cancella()" /> </p> </body> </html>
grazie
maxxl

					
					
					
						
  Rispondi quotando