[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

select all answers belongs to one question from xml wi

Subject: select all answers belongs to one question from xml with xpath
From: 04083259@xxxxxxxxxxxxx
Date: Thu, 30 Jun 2005 19:36:25 +0100 (BST)
text answers
hi every one
i have a set of questions and for each question a  set of answers (4
answers )stored in xml file as each each answer has an attribute as a
reference to the question that it belogs to as following :
<ques>
<question id="q1">
<text>a question</text>
</question>

<question id="q2">
<text>a question</text>
</question>

<question id="q3">
<text>a question</text>
</question>

</ques>

<ans>
<answer an_id="an1" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an2" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an3" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an4" question="q1">
<text>an answer</text>
</answer>

<answer an_id="an5" question="q2">
<text>an answer</text>
</answer>

<answer an_id="an6" question="q2">
<text>an answer</text>
</answer>

<answer an_id="an7" question="q2">
<text>an answer</text>
</answer>


<answer an_id="an8" question="q2">
<text>an answer</text>
</answer>


<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
<answer an_id="an5" question="q3">
<text>an answer</text>
</answer>
</ans>


i am trying to write xpath which allows me to get all answers belongs to
one question along with the question that has the answers
i am get stuck

any help please

thanks

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.