Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , subscribe , help , library , announcements , recent posts , open posts Subscribe and Support WebmasterWorld
importing simple xml strings into html pingiesbn msg:4289989 8:22 am on Mar 31, 2011 (gmt 0) 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!
httpwebwitch msg:4310882 5:56 pm on May 11, 2011 (gmt 0)