1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I Cannot add any of my own XML to the FSX .pln plan?

Discussion in 'Tools programming' started by Sims, 18/9/08.

  1. Sims

    Sims

    Joined:
    14/2/08
    Messages:
    53
    Country:
    unitedkingdom
    Hi,

    As I see it the FSX flightplan, (.pln), is an XML

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SimBase.Document Type="AceXML" version="1,0">
        <Descr></Descr>
        <FlightPlan.FlightPlan>
            <Title>KYKM to KGEG</Title>
    ...
    
    So, I should, (in theory), be able add attributes and/or elements.
    But if I do that then the plan does not get loaded, (I get no error or anything).

    Obviously this means that there is an XML schema/DTD somewhere that FSX is referring to to validate the XML.

    Is there anyway that I could add some of my own elements/attributes to the flight plan?
    That way my app only has to deal with 1 XML rather than my own format.

    Thanks

    Sims
  2. ccartmel

    ccartmel

    Joined:
    17/10/06
    Messages:
    127
    Country:
    unitedkingdom
    interesting

    Sims,
    Interesting question and something I have been thinking about for use with VoxATC (experimenting). The XML file just seems a collection of waypoint elements following the informational bit, so wonder what you are trying to add.
    I have a thought: I have several PLN files stored and will try to combine a T&G at an airport other than the departure/arrival airport, e.g. Depart EGGP for T&G @ EGNR, then arrival back at EGGP. May be fun.

    Will advise here if any success or more likely failure:mad:

    Regards
  3. Sims

    Sims

    Joined:
    14/2/08
    Messages:
    53
    Country:
    unitedkingdom
    Thanks for your reply, I look forward to see what results you get.

    Well, it is not just a collection of waypoints, some information could be added to the plan, such as holding points, destination runway for example.

    I am not sure what a T&G is, but all you need to do is add a node anywhere in the XML

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <SimBase.Document Type="AceXML" version="1,0">
    [B]<MyCoolNewElement foo="bar" />[/B]
        <Descr></Descr>
        <FlightPlan.FlightPlan>
    ...
    
    This will cause the flight plan to no longer be loaded.

    Sims
  4. ccartmel

    ccartmel

    Joined:
    17/10/06
    Messages:
    127
    Country:
    unitedkingdom
    Sims,
    I perhaps oversimplified my response. I was referring to the routing section of the Flightplan (attached is the one I looked at) which I assumed was what you wanted to alter. You do not say what you are trying to achieve though.
    Obviously elements in the XML not referenced by the actioning code will not be recognised and may be the cause of the file processing to fail. Haven't looked for a DTD yet.

    T&G is a "Touch and Go" carried out at an airport, sometimes referred to as circuits.

    Will keep you posted

    Attached Files:

  5. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,351
    Country:
    netherlands
    Hi,

    What do you expect from adding more information to the flight plan? If the information you want to add is not in the XML schema of FSX, the information would not be used by FSX when reading your flightplan. So what is the purpose of putting it in?
  6. Sims

    Sims

    Joined:
    14/2/08
    Messages:
    53
    Country:
    unitedkingdom
    The extra info is not for FSX, I just want to add some more information for my own application while keeping everything in one file.
    For example, holding information, what is part of the SID/STAR, top of climb and so forth.

    To FSX those would just be waypoints, but to my app they would just mean a little bit more.

    So I want to be able to use the one flight plan that already exists with a little bit more info for my own app.
    This is why I don't want to change the schema, but rather add attributes or elements that will only make sense to my app.

    I hope that makes sense.

    Sims
  7. arno

    arno Administrator Staff Member FSDevConf team Resource contributor

    Joined:
    28/5/04
    Messages:
    21,351
    Country:
    netherlands
    Hi,

    Yes, that makes sense.

    But since you already tried to add some and FSX does not like the files after that, I think the conclusion is that FSX does not allow other information to be added. I am afraid there is no way to change the internal working of FS for that part.
  8. Sims

    Sims

    Joined:
    14/2/08
    Messages:
    53
    Country:
    unitedkingdom
    It is a shame really, I guess I will have to make my app 'export' the flight plan to FSX.

    It is also a shame that I cannot get SimConnect to add waypoints to the FSX GPS, that way I could get my app to load the waypoints directly.

    Sims

Share This Page