Confusing XPath problem
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Fri Jan 06, 2006 12:16 pm
Confusing XPath problem
Hi all
I am having problems with extracting some thing out of one xml file. Please have a look at it.
Now I want to extract node "Name" if there is Symptom "weakness". So the answer should be "lungcancer" and "pneumonia". But I can't figure out what the XPath query should be. Can anyone please help me?
How to go up one or more than one level in xpath. For one level, getParentNode() works. But what about more than one level?
Thanks
I am having problems with extracting some thing out of one xml file. Please have a look at it.
Code: Select all
<diseases>
<disease>
<DocumentName>lungcancer</DocumentName>
<Name>lung cancer</Name>
<Symptoms>
<Symptom number="1">coughing blood</Symptom>
<Symptom number="2">weakness</Symptom>
</Symptoms>
</disease>
<disease>
<DocumentName>pneumonia</DocumentName>
<Name>pneumonia</Name>
<Symptoms>
<Symptom number="1">inflammation of lungs</Symptom>
<Symptom number="2">weakness</Symptom>
</Symptoms>
</disease>
</diseases>
How to go up one or more than one level in xpath. For one level, getParentNode() works. But what about more than one level?
Thanks
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service