Jump to content

Xpath Expression


Recommended Posts

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....

Edited by karthikin
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...