Some of the XML documents form the OGameAPI can not be validated using the linked XSD.
This makes it hard for developers to write own code which querys the API for data.
I tested every XML document with the Firefox addon "XML Developer Toolbar"
In detail are these APIs affected:
s1-de.ogame.gameforge.com/api/alliances.xmlThere is only a small bug in the XSD. This can be fixed with the following patch:
Display All
playerData
http://s1-de.ogame.gameforge.com/api/playerData.xml?id=1
I tried also to write a patch but after an hour trying just to patch the XSD I came to the point where the XML needs also a fix. This part is so horrible broken that the XSD and the code which generates the XML needs a complete redesign.
Just a few things I noticed:
Cheers
crane
This makes it hard for developers to write own code which querys the API for data.
I tested every XML document with the Firefox addon "XML Developer Toolbar"
In detail are these APIs affected:
- alliance
- playerData
s1-de.ogame.gameforge.com/api/alliances.xmlThere is only a small bug in the XSD. This can be fixed with the following patch:
Difference-File
- --- alliances.xsd.orig 2015-12-30 13:38:52.000000000 +0100
- +++ alliances.xsd 2015-12-30 13:39:29.000000000 +0100
- @@ -3,7 +3,7 @@
- <xs:element name="alliances">
- <xs:complexType>
- <xs:sequence>
- - <xs:element name="alliance">
- + <xs:element name="alliance" maxOccurs="unbounded">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="player" minOccurs="1" maxOccurs="unbounded">
playerData
http://s1-de.ogame.gameforge.com/api/playerData.xml?id=1
I tried also to write a patch but after an hour trying just to patch the XSD I came to the point where the XML needs also a fix. This part is so horrible broken that the XSD and the code which generates the XML needs a complete redesign.
Just a few things I noticed:
- Validation should work against player 1 and player <random>, there are some characteristic differences like position in highscores
- Moon name has type int?!
- Wrong root element
Cheers
crane
Lock 'n load!