BuzzerBeater Forums

BBAPI Support > non compliant xml returned

non compliant xml returned

Set priority
Show messages by
From: grdft
This Post:
00
82439.1
Date: 03/22/2009 13:58:32
Overall Posts Rated:
00
When getting teaminfo (teaminfo.aspx) for a team where the owner has a '&' character in his name, the '&' is not properly encoded, meaning the whole xml structure is invalid.
See for example (77845)

Last edited by Mod-oeuftete at 03/22/2009 14:22:11

This Post:
00
82439.2 in reply to 82439.1
Date: 03/22/2009 14:37:09
Overall Posts Rated:
3737
FWIW, here's a confirmation.


ken@chort:~$ perl -MKGC::BB -le 'my $bb = KGC::BB->new();
$bb->debug(1); $bb->teaminfo( {params => {teamid => 77845} } );'
Sending [http://www.buzzerbeater.com/BBAPI/teaminfo.aspx?teamid=77845]

<?xml version='1.0' encoding='utf-8'?>
<bbapi version='1'>
<team id='77845' retrieved='2009-03-22T18:34:18Z'>
<teamName>Carxofa Team</teamName>
<shortName>CAR</shortName>

<owner supporter='1'>j&j23</owner>

<league id='203' level='3'>III.8</league>
<country id='7'>España</country>
</team>
</bbapi>

not well-formed (invalid token) at line 7, column 34, byte 240 at
/usr/lib/perl5/XML/Parser.pm line 187
at /home/ken/modules/BuzzerBeater/Teaminfo.pm line 36


Last edited by Mod-oeuftete at 03/22/2009 14:37:32

This Post:
00
82439.3 in reply to 82439.2
Date: 03/22/2009 14:44:39
Overall Posts Rated:
00
Yes, so far I've encountered something like 10-20 (didn't count exactly) cases such as this.
This is quite embarassing : since they can't be parsed with a compliant XML parser, they're missed by my programs, meanings I have holes in my data.
And since the data is not encoded, there may be other characters that are bad, such as '<'.

This Post:
00
82439.4 in reply to 82439.3
Date: 03/22/2009 14:52:29
Overall Posts Rated:
3737
I'm guessing it was just a bad or overlooked assumption that the username might need to be escaped. I expect that Dr. Jàn will fix it in short order if he still has the necessary access.

Last edited by Mod-oeuftete at 03/22/2009 14:53:03

This Post:
00
82439.5 in reply to 82439.4
Date: 03/22/2009 14:55:40
Overall Posts Rated:
00
That would be great !
Thanks in advance Dr Jan !

This Post:
00
82439.6 in reply to 82439.4
Date: 08/26/2012 16:57:52
cinomusoj
III.4
Overall Posts Rated:
4444
Second Team:
cinomusoj II
Is this bug fixed ?
I have same problem with (188814).
I get <owner >夏爷&天哥</owner>, which is not valid.

Last edited by wamba at 08/26/2012 17:45:25

From: BB-Marin

This Post:
00
82439.7 in reply to 82439.6
Date: 05/20/2015 10:55:02
TrenseRI
II.3
Overall Posts Rated:
35883588
Second Team:
ChiLeaders
If it wasn't (I realize this is an old thread), it will be shortly.

This Post:
00
82439.8 in reply to 82439.7
Date: 05/20/2015 11:07:45
UJAP Kemper 29
IV.23
Overall Posts Rated:
335335
As you seems really active on BBAPI bugfix.
I have another small one: character <'> is badly encoded. Exemple http://bbapi.buzzerbeater.com/teaminfo.aspx?teamid=86024

This Post:
00
82439.9 in reply to 82439.8
Date: 05/21/2015 12:09:34
This Post:
00
82439.10 in reply to 82439.9
Date: 05/21/2015 13:26:47
UJAP Kemper 29
IV.23
Overall Posts Rated:
335335
Thanks !