Jump to content

<img> with and xml <src> tag


132591
 Share

Recommended Posts

If from an attribute it's :<img src="{@attribute}" />example xml:

<images> <image  src="image.jpg" sub="this is a picture of me" /><image  src="image2.jpg" sub="this is a picture of you" /></images>

example xsl:

<xsl:for-each select="//image"><img src="{@src}" title="{@sub}" /><br/></xsl:for-each>

Output:<img src="image2.jpg" title="this is a picture of you" /><br/><img src="image.jpg" title="this is a picture of me" /><br/>

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
 Share

×
×
  • Create New...