So, I'm leaving the live xml/atom-feed url as something different. It's hosted on LiveJournal, but I don't want to give that link away. Anyways, I seem to have something confused or my understanding is confused on how this works:
let XML_URL = "https://users.livejournal.com/<username>/data/atom";
$(function(){
var xmlDoc = $.parseXML(XML_URL);
var $xml = $(xmlDoc);
// Find Person Tag
var $entry = $xml.find("entry");
$entry.each(function(){
var title = $(this).find('title').text(),
content = $(this).find('content').text();
$("#items" ).html(title+ ' <br /> <br />' +content);
});
});
and the HTML:
<!DOCTYPE html>
<html lang='en-us'>
<head>
<script type="text/javascript" src="js/jQuery.js"></script>
<script type="text/javascript" src="js/xmlreader.js"></script>
</head>
<body>
<div class="style">
<div id="items"></div>
</div>
</body>
</html>
So what am I missing here? Do I need to to read the file itself? If I do.. how do I do so?
EDIT: So, the link provided by @freedomn-m gave me part of the answer I needed. It works, the trouble is now CORS (which i temporarily disabled on my browser to get it working). Im using cloudflare but i can't seem to get the transform rules to allow my site to access the XML file on LiveJournal, even though livejournal allows access to the file. Then, again, i'm not even sure if i even need to mess with the transform rules on cloudflare for this to work.
parseXML parses a string into an XML document.
Example from the documentation:
So you will need to load the actual XML as a string and pass that using
parseXMLrather than the URL that point to where the file is located. You either download it on server-side and generate it into your HTML/JS with the help of the server, or download it via Javascript, as long as your CSP and CORS settings allow you to send requests to the source.