[xsl] XPath statement required pls

Subject: [xsl] XPath statement required pls
From: "Sanjay Pandey/Towers Perrin" <pandeys@xxxxxxxxxx>
Date: Mon, 13 Aug 2001 13:44:04 -0400
Hi,

I have XML file as follows:
<parameter name = "one">
   <level1>
      <level2 name = "a">
     <level3>
          <theField>something</theField>
     </level3>
      </level2>
      <level2 name = "b">
     <level3>
          <theField>something</theField>
     </level3>
      </level2>
      <level2 name = "c">
     <level3>
          <theField>something</theField>
     </level3>
      </level2>
   </level1>
</parameter>

<parameter name = "two">
</parameter>

My problem is as follows:
1. I need to get all the occurrances of <theField> (... and that is fine, I
am getting those, using XPathAPI, into a NodeIterator)
2. For each field I want to get the nearest Attribute value, so that I can
uniquely identify <theField>. Is there a generic way to get the
     nearest Attribute value? In my case it is not always true that the
attribute for a field (in this case <theField>) is at a particular level
     (in the current case, I can get the attribute value by going w levels
up, ... but then that is what I am trying to find if there is generic
      way to find the nearest Attribute value for a particular field)

Thanks in advance,
Sanjay



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread