Broken XML/XSD data from OGameAPI

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Broken XML/XSD data from OGameAPI

      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:
      • alliance
      • playerData
      alliance
      s1-de.ogame.gameforge.com/api/alliances.xml
      There is only a small bug in the XSD. This can be fixed with the following patch:

      Difference-File

      1. --- alliances.xsd.orig 2015-12-30 13:38:52.000000000 +0100
      2. +++ alliances.xsd 2015-12-30 13:39:29.000000000 +0100
      3. @@ -3,7 +3,7 @@
      4. <xs:element name="alliances">
      5. <xs:complexType>
      6. <xs:sequence>
      7. - <xs:element name="alliance">
      8. + <xs:element name="alliance" maxOccurs="unbounded">
      9. <xs:complexType>
      10. <xs:sequence>
      11. <xs:element name="player" minOccurs="1" maxOccurs="unbounded">
      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:
      • 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
      There are a lot more but a redesign is better than fixing all the small things.
      Cheers
      crane
      Lock 'n load!