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 :/
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/