Azərbaycan dili Bahasa Indonesia Bosanski Català Čeština Dansk Deutsch Eesti English Español Français Galego Hrvatski Italiano Latviešu Lietuvių Magyar Malti Mакедонски Nederlands Norsk Polski Português Português BR Românã Slovenčina Srpski Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Русский Українська Հայերեն ქართული ენა 中文
Subpage under development, new version coming soon!

Onderwerp: »[news] XML Data Improvements

2007-01-14 19:27:28
Hi. I´m developing a tool for the NT manager.

I´m trying to get the xml of the Argentinean NT team (code 19) and the xml is returned with no data at all:

* I am doing something wrong or the data of the nt players can´t be obtained (just form, ntgoals and all that stuff that you can get for other teams)

* If it is not possible to get the data as a regular user (my user). Can the NT coach get this data of his own NT Team?

Thanks, i don´t know if this was already discussed
(gewijzigd)
2007-01-16 20:57:14
answered own comment :)
(gewijzigd)
2007-01-24 14:04:18
Hi!

I'm trying to create a online tool for the Bulgarian NT. But I have a small problem.
I can't parse the XML file directly from sokker.org. What I mean...

Here is an example of a test site.

"Login" is for a session creating.
"FC Silent Thunder" shows the XML file of my team.
"My Players" shows the XML file of my players.
"XML on my server" is php script for parsing of the XML file located on my server.
"XML on sokker.org" is the same php script which trys to parse the same XML file but directly from sokker.org.

Have somebody an idea why it doesn't function? Thx.
2007-01-24 14:13:00
for app devs:

Do You catch such exception as not existing player in XML ?

e.g. player-1.xml ?
2007-01-24 14:20:21
I'm trying to parse http://online.sokker.org/xml/player-1838145.xml

It's not a problem to parse the same file but saved on my server:
http://sokker.bg-manager.org/db/player-1838145.xml.
2007-01-24 14:23:10
"XML on sokker.org" is the same php script which trys to parse the same XML file but directly from sokker.org.

Could you give more detail? Does the script wait for the whole XML to be loaded in memory before parsing?
2007-01-24 14:39:41
This is my php script as text file:

http://sokker.bg-manager.org/db/player.txt
2007-01-24 17:13:28
You are not going anywhere with that script. You need to use Curl function to login (setting a cookie) and then dowload the xml file, you can't read it directly. Once you stored the contenent in a variable you can parse it.
2007-01-24 20:42:44
@LordGelu :
An example :

#! /bin/bash
#set -x
curl -c skcook -d "ilogin=ferdam&ipassword=xxxxxxx" http://online.sokker.org/start.php?session=xml -o /tmp/sk_ferdam_session
cat league.dat | awk -F',' '{print $1}'`| while read line
do
curl -b skcook -m 12 --retry 3 --retry-delay 3 "http://online.sokker.org/xml/league-$line.xml" -o xml/team_$line.xml
sleep 5
done

If you want more details about that, please tell me.
Ops ! I'm using Linux, I don't know about windows - sorry
(gewijzigd)
2007-01-24 21:43:54
here is an exemple of cUrl use to donwload xml:
http://www.solina.it/sokker/code.txt
I use almost the same code in my site
2007-01-24 22:16:47
Thanks!!! :)
2007-02-14 00:45:31
What have You noticed more in this XMLs is there any bugs or missing ?

Some match XMLs have invalid characters. For instance, in this game one of the tactic names is wrong and has a 0x1 character.
2007-02-14 00:48:03
Has anyone figured out yet what the tags "timePlaying" and "timeDefending" stand for? (in match-xxxx.xml)

If I divide "timePlaying" by 31698 I get the Off % of the player for that match, but this doesn't apply to the def%

:S
(gewijzigd)
2007-02-14 03:08:03
I got the # by dividing each player's off # by the sums of all off %'s and doing the same

ie def1 / sum(def 1-11) is the % for player 1...
2007-02-14 05:12:10
oh man, that 'd be TERRIBLE :S
why would the implement it in such a stupid way that the data on its own is useless...?!?
2007-02-14 05:34:02
The data is not useless.

See for example this match

The value given in timePossession tag for Charrúa Roots (my team) is 30642

This value represents possession (49%)... my part of the overall time played.

As you have noticed, if you sum all the values of the timePlaying tag of all the players of your team, you will get this same value (in my case, again 30642).

This means that the "Off. %" for each player of your team represents the weight of your player in the overall offensive (possessing) activity of your team. This is usefull data.

On the other hand, the sum of all the timeDefending tags of my players is 12152. The "Def. %" of each of my players represents their weight in the overall defensive activity of my team. This is also usefull data.

For example you can get from this data important information such as from what side of the field you where more frequently attacked.