Xml2Tmx - A Utility For Aircraft Developers

  • That's why for me an xml editor style would slow things down, I'm just not used to reading xml code. But if you're used to it I see that it might speed things up for you. and that's a good thing. The only issue that I would see is: how do I add comments and how do I indent parameters in a block form, e.g. like for aerowings. Usually I do " 1.0 0.0 0.0 " for the string, with leading and trailing white space, which might look weird in xml.... but in tmd block form it works great: [ 1.0 0.0 0.0 ] looks more like my c++ code ( 1.0 0.0 0.0 ) and without that it looks too cramped and isn't easy to read [1.0 0.0 0.0 ]. This makes a difference after 8 hours of work. In Jeremy Clarkson's voice: "Whitespace gooood. No whitespace baaaad." 8o^^

    And on top of the readability... I wonder how do you "ctrl+s", "alt+tab" + reload in aerofly then? I imagine you would have to compile your xml back to tmd first and that takes a couple more clicks or key strokes I guess? Unless you hook it up to your IDE commands. And I sometimes do that 10x a minute, so even the "ctrl+s" and "alt+tab" already gets annoying.

    I think you're right that it depends what you're used to. In my professional work, if I'm not in a C#, Java or Typescript file, I'm in an XML or JSON file. Your brain learns to scan what you see all the time.

    Splitting the project up into multiple files was the main driver for this utility and definitely helped a newbie like me get a handle on all the individual parts that make up a plane. In any dev project I'd take small self describing files over one huge file.

    The TMD file felt like an intimidating slab of unfamiliar markup to me, but if you edit them day in, day out, I can see why it wouldn't seem like that.

    On those other things

    Comments / White space

    I only needed to go from TMD to XML once. After that it's only XML to TMD.

    Nothing is reformatting the XML so I can use XML comments, white space, line breaks in attributes as I need.

    The extra spaces or line breaks for vectors work fine.

    Reload Workflow

    Yesterday I sent an hour coding a "watch" command that writes the TMD when any included XML file is changed, which removes having to remember to run the convert action each time.

    Short hand version

    I'd argue that using "off the shelf" markup languages makes sense as everything can process them and everyone is familiar with them.

    Your example is most similar to YAML, which could also work well here, along with JSON.

    (I understand that the TMD format is good as an output format as it's so easy and quick to parse).

    It may be the case that no one else needs this utility as they are OK with TMD, but it's definitely helped me out.