i have the following code in my simple xml document
<?xml version="1.0"?>
<sample>
<link xml:link="simple" href="http://www.google.com"> Google page </link>
</sample>
But this is appearing as just tags in the browser irrespective of what browser it is
This is what displayed on my browser:
<sample><link xml:link="simple" href="http://www.google.com"> Google page </link></sample>
Please let me know why the hyperlink is not appearing on the browser instead of the tags. I have attempted many options but it seems like im missing something very basic here
Thanks
You can not not open XML file with HTML kind of behavior. For that you need to transform your XML file to HTML file using XSLT. Following code snap will help you to transform XML file to HTML file using XSLT:
Apply following XSLT:
XML file is this:
C# function to transform XML file to .HTML file is:
And the output .HTML file is like this:
Open this .HTML file in browser and you will get the link on “Google page” text.
I hope this will help you.