icedragon208 Posted October 12, 2013 Share Posted October 12, 2013 Hello, i am new to xslt and I have a problem. I have a XML file, for example like this: <output> <object> <text id="one"> Example Text 1 </text> </object> . . . <object> <text id="seven"> Example Text 7 </text> </object> . . .</output> And I want to read the Text from <text id="seven"> i tried it with this, <xsl:value-of select="/output/object/text[@id='seven']"/> but it dont works. Can someone please tell me why? Thank you. Link to comment Share on other sites More sharing options...
Martin Honnen Posted October 12, 2013 Share Posted October 12, 2013 Your code looks fine to me. Any chance your real XML has some <output xmlns="http://example.org">...</output> ? Link to comment Share on other sites More sharing options...
icedragon208 Posted October 12, 2013 Author Share Posted October 12, 2013 No but i found the error. The object I wanted to read out had the name "texts" sorry for the trouble :-( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now