I would like to add XML to my HTML page. I would like the Topic to display as an ‘h3’, the content to display as a ‘p’ and the url to display within a ‘a href’.
XML
<linkedin>
<discussion>
<topic>This is the discussion name</topic>
<content>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ligula mi, convallis eget iaculis id, euismod non arcu. Morbi porta.</content>
<url>http://www.linkedin.com/groups/</url>
</discussion>
Here’s how I would like the outputted HTML to look:
<h3>This is the discussion name</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce ligula mi, convallis eget iaculis id, euismod non arcu. Morbi porta.</p>
<a href="http://www.linkedin.com/groups/"></a>
Many Thanks, I hope this explanation of what I’m stuck on makes sense.
NOTE : This is as simple as it gets. It doesn’t handle cases where any of the child nodes aren’t present.
Just to get you started using an ajax request.
HTML
JS (script.js)
I will also recommend using jquery