Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Match attributes [Thread Next] Re: Match attributesTo: NULL Date: 5/16/2008 2:05:00 PM jaPco wrote: > Hi, I've got a question. > > Let's say I have a file XML like that: > > <root> > <field name="a1" value="0" /> > <field name="a2" value="2" /> > <field name="a3" value="4" /> > </root> > > and I know I want to get value from field with attribute name "a2". > How can I access/match it with XSLT ? I tried many different ways but > with no success :( Although it's my second day with XSL :/ Try an XSLT/XPath tutorial, the direct "way" to that attribute value is e.g. <xsl:value-of select="/root/field[@name = 'a2']/@value"/> -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
