0

I have the following simple problem: I have some data in an XML file that i want to display in the content area of my HTML page. I also have a stylesheet (.xsl) for my XML file. When I open the XML in my browser it looks exactly what i want it to look like. However, i don't know how to embed the transformed xml (which is xhtml) in my existing HTML page. What I have so far is:

<a href="data/movielist.xml">Movie List</a>

Of course this Code just creates a link to a new page, where only the xml is displayed, instead of including the whole thing in my html...

Is there any elegant solution for this? IFrames come to my mind but i'd like to avoid them because they are so horribly outdated.

Thanks in advance.

oHoodie
  • 209
  • 4
  • 13
  • I don't see iframes as outdated, nor does HTML 5.1 https://www.w3.org/TR/html51/semantics-embedded-content.html#elementdef-iframe – Martin Honnen Feb 12 '17 at 12:45
  • @Martin Honnen: I was taught to avoid iframes whenever possible and this is for a school project that's why I am hesitant to use it. I might have been taught lots of nonsense tough so I'll use the iframe if no other solution appears – oHoodie Feb 12 '17 at 12:56
  • You can use javascript to perform the XSLT transform too. See http://stackoverflow.com/questions/5722410/how-can-i-use-javascript-to-transform-xml-xslt, for example. – Tim C Feb 12 '17 at 13:04

0 Answers0