karthikin Posted July 1, 2011 Share Posted July 1, 2011 Hi guys, this is my xml. <CONTACT><PDE-Identity>N65567</PDE-Identity><FirstName>Rangarajkarthik</FirstName><LastName>karthik Rangaraj</LastName><Facebook-ID/><EMAILS><EMail Domain="gmail" Value="kart2006@gmail.com"/><EMail Domain="yahoo" Value="karthikrangaraj@yahoo.com"/></EMAILS></CONTACT> I'm trying to write a xquery (query type xml) to read the values of email from the xml file. How do i get the values of "value" of "Domain" from "EMail " inside "EMAILS" to my assigned variable. <query anonid="fulltext" var="?FULLTEXT" expr="(CONTACT)"> <assign var="?pde" expr="PDE-Identity"/> <assign var="?fname" expr="FirstName"/> <assign var="?lname" expr="LastName"/> <assign var="?gmail" expr="EMAILS/EMail[@Domain='gmail']"/> <assign var="?yahoo" expr=""/> <assign var="?alcatel-lucent" expr=""/> <assign var="?facebook" expr="URL"/> <assign var="?id" expr="Facebook-ID"/> </query> Please help me guys.... Link to comment Share on other sites More sharing options...
karthikin Posted July 1, 2011 Author Share Posted July 1, 2011 Fixed the problem by changing the format of the xml file. Thnaks guys. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.