BuzzerBeater Forums

BB Global (English) > BuzzerBeaterStats

BuzzerBeaterStats

Set priority
Show messages by
From: Avirto

This Post:
00
49968.315 in reply to 49968.314
Date: 4/23/2009 8:36:42 AM
Overall Posts Rated:
11
OK, I just asked the question for my information.
Cheers

This Post:
00
49968.316 in reply to 49968.314
Date: 4/23/2009 5:48:42 PM
Overall Posts Rated:
3737
The problem is that the information (XML) that I am getting from BuzzerBeater is not compatible with my reader, when there are strange characters like & and  

The login just won't work... I don't really have time or money to fix this problem at the moment.


Just for the record, there are some problems out there with the info that comes from the BBAPI, but this isn't one of them. The XML is valid. (I know you didn't suggest otherwise.)

$ perl -MKGC::BB -e 'my $bb = KGC::BB->new; $bb->debug(1);
my $p = $bb->teaminfo( {params => { teamid => 23212 }});'
Sending [http://www.buzzerbeater.com/BBAPI/teaminfo.aspx?teamid=23212]
<?xml version='1.0' encoding='utf-8'?>
<bbapi version='1'>
<team id='23212' retrieved='2009-04-23T21:44:08Z'>
<teamName>W&amp;C Bball Club</teamName>
<shortName>W&amp;C</shortName>

<owner >squeakrico7</owner>

<league id='14' level='3'>III.9</league>
<country id='1'>USA</country>
</team>
</bbapi>


Last edited by Mod-oeuftete at 4/23/2009 5:54:39 PM

This Post:
00
49968.317 in reply to 49968.316
Date: 4/24/2009 2:43:45 PM
Overall Posts Rated:
4242
No worries on fixing it. I would love to use bb-stats at some point but I'm pretty busy at the moment anyway. If you do managed to get it fixed, let me know.

Appreciate it. Completely understand the time/money constrictions.

Message deleted
From: LA-Niko
This Post:
00
49968.319 in reply to 49968.1
Date: 4/27/2009 3:38:58 AM
Overall Posts Rated:
2121
BB-Stats Currently Down.

It is looking like I will have to re-think the country page

Creator of (http://www.buzzerbeaterstats.com) and (http://www.buzzerbeaternews.com/) -- Ex GM of Australia -- Division 1 winner of Italy Season 1 then moved team to Australia after the country was created by the BBs. Australian team manager for 2 seasons. Won various tournaments and division 1 titles in the following seasons.
Message deleted
From: LA-Niko
This Post:
00
49968.321 in reply to 49968.1
Date: 4/29/2009 2:46:59 AM
Overall Posts Rated:
2121
BB-Stats Update

The site is back up and the speed of the country page improved. The totals have been removed for each league as they took too much to calculate.

Creator of (http://www.buzzerbeaterstats.com) and (http://www.buzzerbeaternews.com/) -- Ex GM of Australia -- Division 1 winner of Italy Season 1 then moved team to Australia after the country was created by the BBs. Australian team manager for 2 seasons. Won various tournaments and division 1 titles in the following seasons.
This Post:
00
49968.322 in reply to 49968.316
Date: 4/30/2009 12:51:38 AM
Overall Posts Rated:
2121
I am trying to fix this problem with the BBAPI XML.

I have searched and searched and haven't found a solution.

I cant see how I can add entity declarations on the fly with XMLReader...

The stuff I have read suggests that for RelaxNG Schema code such as <amp/> should be used instead of &amp; because it does not allow for manipulating the entity structure.


Any help with this would be greatly appreciated. But one very important thing is that I am not going to change my parser.

Creator of (http://www.buzzerbeaterstats.com) and (http://www.buzzerbeaternews.com/) -- Ex GM of Australia -- Division 1 winner of Italy Season 1 then moved team to Australia after the country was created by the BBs. Australian team manager for 2 seasons. Won various tournaments and division 1 titles in the following seasons.
This Post:
00
49968.323 in reply to 49968.322
Date: 4/30/2009 6:57:11 AM
Overall Posts Rated:
3737
Any help with this would be greatly appreciated. But one very important thing is that I am not going to change my parser.


I think this will be a sticking point. I'm not an XML expert, but if your parser isn't handling completely-valid, spelled-out-in-the-XML-spec "&amp;"...

(http://www.w3.org/TR/2008/REC-xml-20081126/#dt-chardata)

...your parser is broken. Maybe you have good reasons for having no choice but to use a broken one. Using one that isn't broken is the obvious solution otherwise.

Can you do some very naive transformation of the XML you do get to convert the XML to something your parser can understand? Like s/&amp;/\<amp\/\>/g or whatever?

Also, I question whether your parser is broken? Are you sure you're not doing anything to the XML, intentionally or not, before handing it to XMLReader? I can't imagine handling &amp; would be broken.

Edit: I just ran the test validation script at:

(http://ca.php.net/manual/en/xmlreader.isvalid.php#xmlread...)

... against the XML I dumped above in (49968.316), and it comes back as valid in PHP 5.2.6.

Finally, I'm guessing from your username that you're also testing a problem with ampersands or other entitified characters in login names, and my understanding from Domenico is that this known issue (see (77432.6) and onward) won't be fixed any time soon.


Last edited by Mod-oeuftete at 4/30/2009 11:29:20 AM

This Post:
00
49968.324 in reply to 49968.323
Date: 5/1/2009 10:09:24 PM
Overall Posts Rated:
2121
Here is the code from my login script. I consulted a web expert and they said that the XML should have a DTD to declare the entity otherwise it will fall-back to XML Transitional?
I don't do anything to the XML I just grab it directly from the CURL operation which I use to authenticate.

From bblogin.php5
------
... curl code to retrieve the xml ...

$reader = new XMLReader();
if(!$reader->XML(curl_exec($curl),"UTF-8")) {...throw error...}
curl_close($curl);
$loggedin = false;// default value
while ($reader->read())
{
... continue with login process...
-------

Creator of (http://www.buzzerbeaterstats.com) and (http://www.buzzerbeaternews.com/) -- Ex GM of Australia -- Division 1 winner of Italy Season 1 then moved team to Australia after the country was created by the BBs. Australian team manager for 2 seasons. Won various tournaments and division 1 titles in the following seasons.
From: LA-Niko
This Post:
00
49968.325 in reply to 49968.1
Date: 5/3/2009 6:00:58 AM
Overall Posts Rated:
2121
BB-Stats Design

Hi All,
I know there are plenty of people with ideas about how BBStats could look better so I thought I would share with all of you the current ideas for the new layout for BBStats

(http://i39.tinypic.com/33y04f4.jpg)

Post in here about how I can improve the design. Hopefully with some ideas from Avirto I might be able to set up different themes that you can choose from in the settings area (not yet created)

Also I have registered (http://www.buzzerbeaterstats.com) to reflect the dual domains that buzzerbeater uses.

Thanks,
JudgeNik

EDIT: Updated link to rev.4 of the design and added mention of the new website address

Last edited by LA-Niko at 5/3/2009 10:12:08 AM

Creator of (http://www.buzzerbeaterstats.com) and (http://www.buzzerbeaternews.com/) -- Ex GM of Australia -- Division 1 winner of Italy Season 1 then moved team to Australia after the country was created by the BBs. Australian team manager for 2 seasons. Won various tournaments and division 1 titles in the following seasons.
Advertisement