PDA

View Full Version : I Cannot add any of my own XML to the FSX .pln plan?


Sims
18 Sep 2008, 03:50
Hi,

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


<?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

ccartmel
18 Sep 2008, 05:16
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

Sims
18 Sep 2008, 06:49
Thanks for your reply, I look forward to see what results you get.

Sims,
The XML file just seems a collection of waypoint elements following the informational bit, so wonder what you are trying to add.


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 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.


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


<?xml version="1.0" encoding="UTF-8" ?>
<SimBase.Document Type="AceXML" version="1,0">
<MyCoolNewElement foo="bar" />
<Descr></Descr>
<FlightPlan.FlightPlan>
...


This will cause the flight plan to no longer be loaded.

Sims

ccartmel
18 Sep 2008, 09:05
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

arno
18 Sep 2008, 14:29
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?

Sims
18 Sep 2008, 14:42
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?

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

arno
18 Sep 2008, 15:11
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.

Sims
18 Sep 2008, 15:28
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.

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