Im trying to create an PHP/XML parser.
I have googled and looked at php.net/xml but I havnt found any tutorials which tell u how to do things in practice.
So for example take this simple xml file: (Simple news content).
Needs to be displayed for example like:
<div class="myDiv">
<h1><a href="/news/1">Heading 1</a></h1>
<h2><a href="/user/32">George Bush</a></h2>
<p>Bla bla bla.</p>
</div>
<div class="myDiv">
<h1><a href="/news/2">Heading 2</a></h1>
<h2><a href="/user/59">Tony Blair</a></h2>
<p>Bla bla bla.</p>
</div>
Can anyone point me in the right direction of how to do this?
Thanks a lot.
I have googled and looked at php.net/xml but I havnt found any tutorials which tell u how to do things in practice.
So for example take this simple xml file: (Simple news content).
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<news>
<article id="1">
<title>Heading 1</title>
<author id="32">George Bush</author>
<content>Bla bla bla.</content>
</article>
<article id="2">
<title>Heading 2</title>
<author id="59">Tony Blair</author>
<content>Bla bla bla.</content>
</article>
</news>
Needs to be displayed for example like:
<div class="myDiv">
<h1><a href="/news/1">Heading 1</a></h1>
<h2><a href="/user/32">George Bush</a></h2>
<p>Bla bla bla.</p>
</div>
<div class="myDiv">
<h1><a href="/news/2">Heading 2</a></h1>
<h2><a href="/user/59">Tony Blair</a></h2>
<p>Bla bla bla.</p>
</div>
Can anyone point me in the right direction of how to do this?
Thanks a lot.