I want to create an HTML which uses an XML file to display page info, such as the body of the page, to make it easier to update, and to make my only one or two separate pages and have them read out the data in the XML for the next page (In other words, refresh the body with new information.)
My XML is structured like this:
<?xml version="1.0" encoding="utf-8"?>
<!--Page Content -->
<pages>
<main>
<head>Home</head>
<text>Body Here</text>
</main>
<gallery>
<head>Gallery</head>
<text>Body</text>
</gallery>
<store>
<head>Store</head>
<text>Body</text>
</store>
<legal>
<head>Legal</head>
<text>Body</text>
</legal>
</pages>
</xml>
I want to be able to pull the information from each root into the HTML and display it as if it were in HTML format
I.e. :
(Snippet from my HTML source, most of which is formatting)
<div class="content_container">
<div class="content_window">
<div class="content_Title">
<p>Header</p>
</div>
<center>
<p>Body</p>
</center>
</div>
</div>
<p>*</p>
<!--Footer -->
<p><center>
<div class="footer">Legal | About | Contact Information </div>
</center></p>
</div>
However, I have been unable to find anything online that would help, JS, CSS, or otherwise, that has actually worked. Any help would be appreciated, thanks.
~John
My XML is structured like this:
<?xml version="1.0" encoding="utf-8"?>
<!--Page Content -->
<pages>
<main>
<head>Home</head>
<text>Body Here</text>
</main>
<gallery>
<head>Gallery</head>
<text>Body</text>
</gallery>
<store>
<head>Store</head>
<text>Body</text>
</store>
<legal>
<head>Legal</head>
<text>Body</text>
</legal>
</pages>
</xml>
I want to be able to pull the information from each root into the HTML and display it as if it were in HTML format
I.e. :
(Snippet from my HTML source, most of which is formatting)
<div class="content_container">
<div class="content_window">
<div class="content_Title">
<p>Header</p>
</div>
<center>
<p>Body</p>
</center>
</div>
</div>
<p>*</p>
<!--Footer -->
<p><center>
<div class="footer">Legal | About | Contact Information </div>
</center></p>
</div>
However, I have been unable to find anything online that would help, JS, CSS, or otherwise, that has actually worked. Any help would be appreciated, thanks.
~John