Sign in to follow this  
n4gix

XML problem in FSX ??

Recommended Posts

Hi experts,A question (or warning ?) for you.......In all my XML gauges for FS9 I use simple constructions like:(A:SIM ON GROUND,bool)SPBRKWhich works without any problem.Iow: print a string or not, based on a certain condition.Now, in FSX this code doesn't work properly.- If I load the 2D-panel (in Windowed mode) sometimes the string will be displayed when appropriate, sometimes it won't. Usually the first section in the gauge that does this, works, and the next sections with the same construction don't.- And if it doesn't, switching to Fullscreen mode, suddenly displays the string correctly (but not always).- And when switching to Fullscreen mode solved it, after switching back to Windowed mode it works normally for the rest of the flight.Now, if I code it like this:(A:SIM ON GROUND,bool)SPBRK(so: pack the string printing in a nested element) the problem is entirely gone.Weird ???Or can someone explain why the first code is wrong ?Cheers, Rob Barendregt

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

>Hi experts,>>A question (or warning ?) for you.......-SNIP->Weird ???>>Or can someone explain why the first code is wrong ?>>Cheers, Rob Barendregt>The new Aces XML is weird to begin with and perhaps theparser is different now for the old, reliable XML.In any case, it may be because the "new" Aces format isso overly BLOATED and your initial code is NOT :)Sorry I have no real answer to your question. Paul

Share this post


Link to post
Share on other sites

Rob,I wish I knew, and just to support what Paul said, it's probably got something to do with the new syntax . Who KNOWS what subtle perfectly legit structures are broken.If I were you, and this may not be the most efficient way to handle it, but probably the most reliable, I'd put the conditional inside the string:%((L:condition, bool))%{if}%BLOATME%{end}--Jon

Share this post


Link to post
Share on other sites

Well, I'll just accept it as it is then :-)I need to clean up some of the old gauges code anyway...Cheers, Rob

Share this post


Link to post
Share on other sites

Rob,I had similar problems with my old gauge when testing it under FSX. Some text was displayed, some not and couldn't figure it out. Finally I rebuilt it using the new XML schema. I started with the ACE.tool to get the mail schema, then I partially worked in UltraEdit32 for copy and paste operations and in ACE to add new elements.A also guess that the new XML parser is not 100 % compliant to the parser used in FS9.rgdslilo

Share this post


Link to post
Share on other sites

>A also guess that the new XML parser is not 100 % compliant to>the parser used in FS9.Actually, it is the other way around. The old parsing engine is rather loosey-goosey and not nearly as strict.There are some things one could "get away with" in FS9 that FSX will not permit... ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this