Playing with XML and JQuery

Wi-Skier

New Member
I want to play with JQuery and XML but I have some problems to do what I want.Some code is better than words :\[code\]<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script><script>xml = "<xml></xml>",xmlDoc = $.parseXML( xml ),$xml = $( xmlDoc );function AddSerie(serieCodeURL,numSaison,numEpisode){ $xml.find('xml').append($('<Serie>')); $xml.find('Serie').append($('<SerieCodeURL>')); $xml.find('SerieCodeURL').append(serieCodeURL); $xml.find('Serie').append($('<saison>')); $xml.find('saison').append($('<num>')); $xml.find('num').append(numSaison); $xml.find('saison').append($('<episode>')); $xml.find('episode').append($('<numEpisode>')); $xml.find('numEpisode').append(numEpisode); $xml.find('episode').append($('<timestamp>')); $xml.find('timestamp').append(new Date().getTime());}</script>\[/code\]Like you can see, I wanna create an XML object and add some nodes to it.Thank's for the help (and sorry for my bad english)Regards,Nico
 
Back
Top