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: 3/22/2009 1:58:32 PM
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 3/22/2009 2:22:11 PM

This Post:
00
82439.2 in reply to 82439.1
Date: 3/22/2009 2:37:09 PM
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 3/22/2009 2:37:32 PM

This Post:
00
82439.3 in reply to 82439.2
Date: 3/22/2009 2:44:39 PM
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: 3/22/2009 2:52:29 PM
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 3/22/2009 2:53:03 PM

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

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

Last edited by wamba at 8/26/2012 5:45:25 PM

From: BB-Marin

This Post:
00
82439.7 in reply to 82439.6
Date: 5/20/2015 10:55:02 AM
TrenseRI
III.2
Overall Posts Rated:
36003600
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: 5/20/2015 11:07:45 AM
UJAP Kemper 29
IV.24
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: 5/21/2015 12:09:34 PM
This Post:
00
82439.10 in reply to 82439.9
Date: 5/21/2015 1:26:47 PM
UJAP Kemper 29
IV.24
Overall Posts Rated:
335335
Thanks !