Skip to content

XML Schema Specification

Nicholas de Paola edited this page Nov 27, 2023 · 1 revision

Overview

The project uses an XML-based schema for encoding project data between the frontend and desktop tool - this wiki article describes the XML specification.

Example

<order>
    <details>
        <quantity>6</quantity>
        <bracket>18</bracket>
        <stock>(S30) Standard Smooth</stock>
        <foil>false</foil>
    </details>
    <fronts>
        <card>
            <id>1wlrM7pNHQ5NqS9GY5LWH7Hd04TtNgHI4</id>
            <slots>0,1,2,3</slots>
            <name>Rite of Flame.png</name>
            <query>rite of flame</query>
        </card>
        <card>
            <id>1Sy9Me6fD3Kt6eWpN_RX3tGo2DqgUHFwa</id>
            <slots>4,5</slots>
            <name>0. Huntmaster of the Fells.png</name>
            <query>huntmaster of the fells</query>
        </card>
    </fronts>
    <backs>
        <card>
            <id>1M7LJMlEmYumq8QtiYt1HNfJt1Zmi1Y9j</id>
            <slots>4,5</slots>
            <name>0. Ravager of the Fells.png</name>
            <query>ravager of fells</query>
        </card>
    </backs>
    <cardback>C:\Users\chilli-axe\Desktop\cardback.png</cardback>
</order>

XML Elements

  • The XML document should contain a single order tag and contain the following elements:

Order Details

  • Defined in the details tag as:
    • quantity - total number of cards in the order. Must be less than or equal to bracket.
    • bracket - the MPC bracket the order falls into - e.g. ordering 6 cards falls into the bracket of "up to 18 cards". Valid options at time of writing are 18, 36, 55, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234, 396, 504, and 612.
    • stock - the selected cardstock. Valid options are (S30) Standard Smooth, (S33) Superior Smooth, (M31) Linen, and (P10) Plastic.
    • foil - whether the card fronts should be holographic. Valid options are true or false.

Cards

  • Card fronts are defined in the fronts tag, and card backs are optionally defined in the backs tag (as in, your XML will still be valid if it does not contain the backs tag, and only defines fronts).
  • fronts and backs should each contain a number of card elements.
  • Each card element is defined as:
    • id - can contain a filepath on the computer running the tool or a Google Drive file ID.
    • slots - A comma-separated list of the slots within the card's face that this image should be filled into.
    • name - The name of the file. If a file with this name exists in the cards directory, the tool will use this file rather than downloading the file from Google Drive. This field is optional for the desktop client.
    • query - The query which returned this image in the web component. This enables re-uploading an existing XML to continue editing, and is optional for the desktop client.

Cardback

  • The cardback tag contains a reference to a single image which is allocated to the backs of any cards which don't have back images defined in backs.
  • Functions identically to the id tag in cards - if the value is a filepath, the tool will use that file; otherwise, it will treat the value as a Google Drive file ID and attempt to download it from Google Drive.
Clone this wiki locally