Hi, I have a very simple xml file like this:
<MyText>
<Text1>first text going to website
</Text1>
<Text2>second text going to website
</Text2>
</MyText>
I need my html(index) file to pick up the text from the xml file. What is the simplest solution how to do this? Could anyone please give me help in how to code this?
The nearest I am a solution, is doing as follows - making a xsl file looking something like this:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>
<xsl:value-of select="MyText/Text1" /><br/>
</h2>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
and linking to it in the xml file via this line
<?xml-stylesheet type="text/xsl" href="xslfile.xsl"?>
But I don't know how to put this in the right place of my html file.
Or are there other ways to do this?
I appreciate all the help I can get!