Jump to content

Read Text from XML-File


icedragon208

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...