Hello,
Is it possible to loop through an element and have it skip over certain characters so that it spits out only what you want? For example, inside the Picture tag I need to either strip out or skip over everthing before the http://protocol.
I have tried searching for examples of this and fear that there may be no solution. I have also used basic find and replace in any given editor but this is tedious and only satisfies limited results.
Thank-you all in advance,
Andrea
Here is a block of xml code:
<Product Id="12x10czpendent">
<Code>P033OV</Code>
<Description>12X10 CZ PENDENT</Description>
<Url>http://store.silverandcz.com/12x10czpendent.html</Url>
<Thumb><img border=0 width=62 height=70 src=http://us.st11.yimg.com/us.st.yimg.com/I/yhst-77161201758896_1920_678></Thumb>
<Picture><img border=0 width=269 height=305 src=http://us.st11.yimg.com/us.st.yimg.com/I/yhst-77161201758896_1920_3417></Picture>
<Orderable>YES</Orderable>
<Taxable>YES</Taxable>
<Pricing>
<BasePrice>2.50</BasePrice>
<LocalizedBasePrice>2.50</LocalizedBasePrice>
</Pricing>
<Path>
<ProductRef Id="pendants" Url="http://store.silverandcz.com/pendants.html">Pendants</ProductRef>
</Path>
<Caption>MOD 4 PRNG PENDENT 12X10</Caption>
<OptionLists>
<OptionList name="Color">
<OptionValue>Amethyst</OptionValue>
<OptionValue>Black</OptionValue>
<OptionValue>Champagne</OptionValue>
<OptionValue>Peridot</OptionValue>
<OptionValue>Pink</OptionValue>
<OptionValue>Aqua Glass</OptionValue>
<OptionValue>White</OptionValue>
</OptionList>
</OptionLists>
</Product>
Here is my xsl stylesheet
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<table border="1">
<xsl:for-each select="StoreExport/Products/Product">
<tr>
<td><xsl:value-of select="Url"/></td>
<td><xsl:value-of select="Description"/></td>
<td><xsl:value-of select="Description"/></td>
<td><xsl:value-of select="Picture"/></td>
<td><xsl:value-of select="Path"/></td>
<td><xsl:value-of select="BasePrice"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>