karthikin Posted June 30, 2011 Share Posted June 30, 2011 Hi Guys, please help me to parse this xml file in javascript.This is part of my xml file: <?xml version="1.0" encoding="UTF-8"?><CONTACTS><CONTACT><PDE-Identity>N65539</PDE-Identity><FirstName>Arun_niit</FirstName><LastName>Arun_niit</LastName><Facebook-ID/><EMAIL><Type>yahoo</Type><Value>nura_ice@yahoo.co.in</Value></EMAIL></CONTACT><CONTACT><PDE-Identity>N65546</PDE-Identity><FirstName>FodenBen'</FirstName><LastName>Ben' Foden</LastName><URL>http://www.facebook.com/profile.php?id=100002440474277</URL><Facebook-ID>100002440474277</Facebook-ID><EMAIL/></CONTACT><CONTACT><PDE-Identity>N65553</PDE-Identity><FirstName>GhorbelMahmoud</FirstName><LastName>Mahmoud Ghorbel</LastName><Facebook-ID/><EMAIL><Type>alcatel-lucent</Type><Value>mahmoud.ghorbel@alcatel-lucent.com</Value></EMAIL></CONTACT><CONTACT><PDE-Identity>N65560</PDE-Identity><FirstName>keyankarthik</FirstName><LastName>karthik keyan</LastName><Facebook-ID/><EMAIL><Type>yahoo</Type><Value>karthycse@yahoo.co.in</Value></EMAIL></CONTACT><CONTACT><PDE-Identity>N65567</PDE-Identity><FirstName>Rangarajkarthik</FirstName><LastName>karthik Rangaraj</LastName><Facebook-ID/><EMAIL><Type>gmail</Type><Value>kart2006@gmail.com</Value><Type>yahoo</Type><Value>karthikrangaraj@yahoo.com</Value></EMAIL></CONTACT><CONTACT><PDE-Identity>N65576</PDE-Identity><FirstName>ReddyAkky</FirstName><LastName>Akky Reddy</LastName><Facebook-ID/><EMAIL><Type>gmail</Type><Value>akkireddych@gmail.com</Value></EMAIL></CONTACT><CONTACT><PDE-Identity>N65583</PDE-Identity><FirstName>SandfordFrankie</FirstName><LastName>Frankie Sandford</LastName><URL>http://www.facebook.com/FrankieSandfordApprovedPage</URL><Facebook-ID/><EMAIL/></CONTACT><CONTACT><PDE-Identity>N65590</PDE-Identity><FirstName>TheSatsRochelle</FirstName><LastName>Rochelle TheSats</LastName><URL>http://www.facebook.com/profile.php?id=100002487211054</URL><Facebook-ID>100002487211054</Facebook-ID><EMAIL/></CONTACT><CONTACT><PDE-Identity>N65597</PDE-Identity><FirstName>KumarVeera</FirstName><LastName>Veera_Kumar</LastName><Facebook-ID/><EMAIL><Type>yahoo</Type><Value>KUMARg_81@yahoo.com</Value></EMAIL></CONTACT></CONTACTS> This i smy part of my xul code: <row> <label value="Gmail"/> <textbox id="gmail" value=""/> </row> <row> <label value="Yahoo"/> <textbox id="yahoo" value=""/> </row> <row> <label value="Alcatel-Lucent"/> <textbox id="alcatel-lucent" value="" /> </row> <row> I know how to parse values the values for FirstName/LastName like this : getElementsByTagName("PDE-Identity")[0].childNodes[0].nodeValue; and I can put it in textbox:id.value; Serious I don't how to parse the Email values. Please help me guys. Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.