As the topic might suggest, I'm having a bit of a hard time parsing some XML, also I'm new to PHP.
What I've been working with is Active-link.org's XML functions, as they seem to be the most streamlined and easiest for me to pick up at this point(much pressure to get something done quickly).
At anyrate, the problem is this:
When I try out the .php page, it shows nothing, and my script gets garbled up when viewed through the browser.
Here's a link: test.kithulu.com/test.php
As I said I'm compleatly new to PHP.
Here's the code for the test.php page:
Any help'd be appreciated.
What I've been working with is Active-link.org's XML functions, as they seem to be the most streamlined and easiest for me to pick up at this point(much pressure to get something done quickly).
At anyrate, the problem is this:
When I try out the .php page, it shows nothing, and my script gets garbled up when viewed through the browser.
Here's a link: test.kithulu.com/test.php
As I said I'm compleatly new to PHP.
Here's the code for the test.php page:
Code:
<html>
<head>
<title>
PHP Test
</title>
</head>
<body>
<?php
require_once("classes/include.php");
import("org.active-link.xml.XML");
import("org.active-link.xml.XMLDocument");
$journalObject = new XMLDocument("journal.xml");
$journalXML = $journalObject->getXML();
$journalEntries = $journalXML->getBranches("journalentry");
$journalEntries->arsort();
$journalCount = count($journalEntries);
//for ($i = 0; $i <= count($journalEntries); i++) {
?>
<table>
<tr>
<td>
Subject: <?php
//echo($journalEntries[1]->getTagContent("subject");
?>
</td>
<td>
Mood: <?php
//echo($journalEntries[1]->getTagContent("mood");
?>
</td>
</tr>
<tr>
<td>
Music: <?php
//echo($journalEntries[1]->getTagContent("music");
?>
</td>
</tr>
<tr>
<td>
<?php
//echo($journalEntries[1]->getTagContent("entry");
?>
</td>
</tr>
</table>
<?php
}
?>
</body>
</html>
Any help'd be appreciated.