Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

XML strings

Featured Replies

The variable (A:GPS WP NEXT ID,string) shows the ID of this waypoint as a string of letters (e.g. EGSS). Is it possible to check the ID of the next WP against a given, and if true to associate an action to it. e.g.:------------------------------------------- (A:GPS WP NEXT ID,string) EGSS == if{-------------------------------------------but I cannot get it to work.Your help is very appreciated!Servus from ViennaErnestus

  • Moderator

I'm not certain that XML offers the equivalent of a strcmp (string compare) function, but of of the oddities of that function is that it returns a ZERO if true, not a ONE...

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

This should work:(A:GPS WP NEXT ID,string) 'EGSS' scmp !if{ }As Bill said, note the funny thing with stringcompare: it returns "0" when strings are equal, "1" when not equal.Not very logical indeed ..LOLCheers, Rob Barendregt

  • Moderator

Thanks, Rob... Now that you mention it, I do remember seeing that in some XML code once or twice... ;)As for the "0" return, it makes perfect sense when you consider that after expanding the C function, you find that it is simply subtracting the numeric values of the two strings! Of course it will be zero if they are equal! ;)On another note Rob, how would having the ability to convert your XML code to an encrypted binary format sit with you? I've been looking at some possibilities, and that seems to be the most likely to be "doable."

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Thanks a lot! It works.Servus from ViennaErnestus

Hi Bill,Yes, I understand why the FS StringCompare gives the result is does; but that doesn't make it logical behaviour from a programmer's perspective, does it :-) ??About the encription: yes, I'm certainly interrested in such a thing. If only how you would solve the problem of letting FS load an encripted XML file with real-time decription. Unless you had a .xml --> .gau conversion in mind ?Regards, Rob

  • Moderator

>Hi Bill,>>Yes, I understand why the FS StringCompare gives the result is>does; but that doesn't make it logical behaviour from a>programmer's perspective, does it :-) ??Agreed! I got caught with my "pants around my ankles" the first time around with this myself... ;)>About the encription: yes, I'm certainly interrested in such a>thing. If only how you would solve the problem of letting FS>load an encripted XML file with real-time decription. >Unless you had a .xml --> .gau conversion in mind ?I'm still in the "what if" stage, but it should be possible to insert a wedge inbetween the sim engine and the .cab file to decrypt the binary xml code on panel load or connect to window.But, who knows? Maybe something will come from this speculation, maybe not... ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Bill,Your idea sounds more than interesting. However, at first sight it might be something difficult to achieve.The .cab could be decrypted when panel load process starts, and encrypted again before it ends.But if load is aborted, .cab would stay decrypted and therefore open to everybody?Just a thought :-)Tom

  • Moderator

Er, nope. The basic idea is to simply decrypt on panel load to memory. No 're-encryption' would be necessary at all. IOW, no change would occur to the source .cab file at all, and whatever occurs would be totally transparent to the user.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

That "basic" idea to me is a great idea.Please accept me as the first customer of your (dll?) :-)Tom

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.