# Why The News Is Not Being Pulled \[XML JS Query\]

**URL:** <https://forum.kirupa.com/t/why-the-news-is-not-being-pulled-xml-js-query/636483>\
**Category:** web dev\
**Created:** [April 22, 2017, 6:27pm UTC](https://forum.kirupa.com/t/why-the-news-is-not-being-pulled-xml-js-query/636483 "2017-04-22T18:27:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![schttrj](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/schttrj/32/8409_2.png) [@schttrj](https://forum.kirupa.com/u/schttrj)\
**Post date:** [April 22, 2017, 6:27pm UTC](https://forum.kirupa.com/t/why-the-news-is-not-being-pulled-xml-js-query/636483/1 "2017-04-22T18:27:02Z")

</div>

Here’s my code.

```auto
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>News Site</title>
<script>
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
	if (this.readyState == 4 && this.status == 200) {
		var xmlDoc = this.responseXML;
		document.getElementsById("demo").innerhtml = xmlDoc.getElementsByTagName("title")[0].childNodes[0].nodeValue + "<br/>" + xmlDoc.getElementsByTagName("link")[0].childNodes[0].nodeValue;
		}
		} 
xhttp.open("GET", "http://feeds.feedburner.com/ndtvnews-latest?format=xml", true);
xhttp.send();
</script>
</head>
<body>
<div id="demo"></div>
</body>
</html>

```

I am a beginner in using Ajax and this is my first project. I checked with the format, even validated it with W3 Validator, and it doesn’t seem to work.

Nothing is showing on the page. It’s completely blank.

Can anyone point out my mistake please?
