OZONE Asylum
Forums
CSS - DOM - XHTML - XML - XSL - XSLT
PHP and XML
This page's ID:
29225
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
see if this might help : [code] $request_url = "http://www.worldofwarcraft.com/realmstatus/status.xml"; $xml_data = simplexml_load_file($request_url) or die("feed not loading"); echo "<pre>"; var_dump($xml_data); echo "</pre>"; [/code] This will just dump the xml file into the array and show the SimpleXMLElement object stuff. Or you can play around with each of the attributes like [code] $request_url = "http://www.worldofwarcraft.com/realmstatus/status.xml"; $xml_data = new SimpleXMLElement($request_url,null,true); foreach($xml_data_ as $rs) { echo "Name: {$rs['n']}" . "<br />"; echo "Type : {$rs['t']}" ."<br />"; echo "Status : {$rs['s']}" ."<br />"; echo "Load" : {$rs['l']}" . "<br />"; } [/code] I am guessing that from the xsl they have listed in that file, it does some stuff with the "t" attribute to tell it that 1 = POV, etc... actually, looking at the xsl document, they have this : [code] <xsl:call-template name="rankingRowAlternate"/> − <xsl:choose> − <xsl:when test="@t = 1"> <small style="color: #234303;">Normal</small> </xsl:when> − <xsl:when test="@t = 2"> <small style="color: #660D02;">(PVP)</small> </xsl:when> − <xsl:when test="@t = 3"> <small style="color: #535600;">(RP)</small> </xsl:when> − <xsl:when test="@t = 0"> <small style="color: #535600;">(RPPVP)</small> </xsl:when> </xsl:choose> [/code] So, based on that, you could simply just do a switch statement or something that if the "t" attribute = "2" then echo "(PVP)" or something like that. Hope that helps. Later, C:\
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »