When you are editing a Card, you can need to save it before it is finished. The Pulsar Card Editor (PCE) make it possible by creating a XML file with a textual description of the Card. It is a classic XML file.
Saving a XML Card file do not control the structure of the Card. A Card must have, at least, one Defense Star and one Attack Star linked together. If this condition is not satisfied, the card cannot be converted to binary file format (see the CARD file format page for further informations).
XML files are also used to create a package of cards.
The structure of a XML Card file is very simple and close to the CARD binary format.
No DTD is available at the moment, it will be created and published later.
- the name of the card in english (in <name> tag)
- (optional) the name of the card in other languages (in <name> tags too)
- (optional) the absolute path to the texture file (in <texture> tag)
The <names> tag contains so all the <name> tags. A <name> tag has one attribute that is the ISO 639-1 language code.
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
The <stars> section only contains <star> tags.
A <star> tags has four attributes:
- the index of the star in the card
- relative position on X axis of the star (compared to the Card dimension)
- relative position on Y axis of the star (compared to the Card dimension)
- type of the star
The <links> section only contains <link> tags, each having two attributes:
- the star index it starts from
- the star index it ends to
Here is an example of a XML Card file.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <card> <metadata> <texture>/home/xxx/texture.png</texture> <names> <name lang="de">Großer Bär</name> <name lang="zh">大熊座</name> <name lang="it">Orsa Maggiore</name> <name lang="pt">Ursa Major</name> <name lang="fr">Grande Ourse</name> <name lang="ar">الدب الأكبر</name> <name lang="en">Ursa Major</name> <name lang="ru">Большая Медведица</name> <name lang="es">Osa Mayor</name> <name lang="ja">おおぐま座</name> </names> </metadata> <stars> <star id="15" position_x="-0.39648438" position_y="-0.22851562" type="AttackStar"/> <star id="11" position_x="-0.27539062" position_y="-0.27539062" type="AttackStar"/> <star id="6" position_x="-0.1484375" position_y="-0.1484375" type="AttackStar"/> <star id="0" position_x="0.0" position_y="0.0" type="CentralStar"/> <star id="20" position_x="0.39648438" position_y="-0.22851562" type="AttackStar"/> <star id="27" position_x="0.44140625" position_y="0.0" type="DefenseStar"/> <star id="2" position_x="0.1484375" position_y="0.1484375" type="AttackStar"/> </stars> <links> <link from="15" to="11"/> <link from="11" to="6"/> <link from="6" to="0"/> <link from="0" to="20"/> <link from="20" to="27"/> <link from="0" to="2"/> <link from="2" to="27"/> </links> </card>