Okay, that's neat and I get what you're saying with xml_process() to
handle this.

>From what I'm reading, it would not allow this sort of procedure, but
please let me know otherwise:

======================================================
echo "<td>" . $ServerName;
if ($ServerType)
{
        echo " <i>(" . $ServerType . ")</i></td>\n";
} else {
        echo "</td>\n";
}

if ($ServerStatus == "Down")
{
        echo "<td><i>" . $ServerStatus . "</i></td>\n";
} else {
        echo "<td>" . $ServerPopulation . "</td>\n";
}
======================================================

So, what would print in the first and 2nd column would depend upon the
results of one of two variables (1st column relies upon if there's a
$ServerType or not, 2nd column relies upon the $ServerStatus not being
"Down").

My problem is still my own, I can't get it so that when I parse, the
information is placed into an array that can then be used for sorting.
This would be ideal for me as I plan on reading from more than one .xml
(different structures as well) on the same page if I can get this to
work.

I guess what I'm asking for is a method to parse information into an
array and then sort it by any part of the array.  I attempted the
$ServerArray[$this->ServerName][$this->ServerStatus] = $data in the
parse section (where $data = current node value), but it didn't work.

Again, thanks for all your help so far and in advance for any help you
can provide.

~Confused PHP user

> From: @ Edwin [mailto:[EMAIL PROTECTED]] 
> 
> "Geoff Hankerson" <[EMAIL PROTECTED]> wrote:
> 
> > You don't need to do client-side transformation (although you could 
> > check user agent and do it client-side if the browser supports it). 
> > You can use Php's XSLT functions see the manual for more info.
> >
> > I was just suggesting this as a potential option. It may not be 
> > appropriate in this situation. I don't really know enough about the 
> > programming challenge we are looking at  to say for sure
> 
> I see. I thought you were saying that use XSLT and access the 
> xml file directly--my apologies.
> 
> Anyway, _that_ is certainly a potential option... :)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to