I am trying to transform my XML file using an XSLT and the error ' can't parse the data source (my XML path) Please fix it before transforming appears
Can anybody tell me what does this error mean, why does it appear And how can I fix it?
Thank you very much
My xml below:
<?xml version="1.0" encoding="UTF-8"?>
<videoclub>
<pelicula>
<titulo>pelicula1
</titulo>
<director>myself
</director>
<duracion>30 minutos
</duracion>
</pelicula>
<pelicula>
<titulo>pelicula2
</titulo>
<director>otrapersona
</director>
<duracion>20 minutos
</duracion>
</pelicula>
</videoclub>
And here is my xslt:
<?xml version="1.0" encoding="UTF-8"?>
<!-- New XSLT document created with EditiX XML Editor (http://www.editix.com) at Thu Mar 15 12:10:43 CET 2018 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<html>
<body>
<h2>pelculas
</h2>
<table>
<tr>
<th>titulo</th>
<th>director</th>
</tr>
<xsl:for-each select="videoclub/pelicula">
<tr>
<td><xsl:value-of select="titulo"/></td>
<td><xsl:value-of select="director"/></td>
</tr>
</xsl:for-each>
</table>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>