XPATH problem
-
Hi guys, I have a xml document as below and in Xslt I need to get the person name on the basis of email id as in below xml file , contributor node contain email id and associated name is included in Epic node can any body help me to get the name for each contributor through xpath? <ONIXMessage> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Epic> <Person> <Name>Rohit</Name> <Email>Rohit@gmail.com</Email> </Person> </Epic> </ONIXMessage>
-
Hi guys, I have a xml document as below and in Xslt I need to get the person name on the basis of email id as in below xml file , contributor node contain email id and associated name is included in Epic node can any body help me to get the name for each contributor through xpath? <ONIXMessage> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Product> <Contributor> <Email>Rohit@gmail.com</Email> </Contributor> </Product> <Epic> <Person> <Name>Rohit</Name> <Email>Rohit@gmail.com</Email> </Person> </Epic> </ONIXMessage>
This XPath will get you the name of the first contributor:
//Person[Email=//Contributor[1]/Email]/Name
I don't think you can get all the names in one go with XPath.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p