flying-w Posted August 21, 2016 Report Posted August 21, 2016 Hello Pete I have a little problem with the latest makerwys.exe (4.6.9.7) and the runways.xml file. If certain scenery paths contain a special character, that's passed through to the XML which can give readers such as the Microsoft .Net classes a problem when they try to deal with it. For example, from ORBX scenery: <File>ORBX\FTX_NA\FTX_NA_CRM05_SCENERY\scenery\ADE_FTX_CRM_16W_Little_Goose_Lock_&_Dam.BGL</File> The above generates an exception as "&" has special meaning in XML; it can be "escaped" to make it valid like this: <File>ORBX\FTX_NA\FTX_NA_CRM05_SCENERY\scenery\ADE_FTX_CRM_16W_Little_Goose_Lock_&_Dam.BGL</File> Would you mind having a look at this please? Many thanks Simon
Pete Dowson Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 5:48 AM, flying-w said: <File>ORBX\FTX_NA\FTX_NA_CRM05_SCENERY\scenery\ADE_FTX_CRM_16W_Little_Goose_Lock_&_Dam.BGL</File> The above generates an exception as "&" has special meaning in XML; it can be "escaped" to make it valid like this: <File>ORBX\FTX_NA\FTX_NA_CRM05_SCENERY\scenery\ADE_FTX_CRM_16W_Little_Goose_Lock_&_Dam.BGL</File> Would you mind having a look at this please? Expand Well, I could eliminate all & signs, but where it is part of a file or path name, as here, that will make that file or pathname incorrect. So what do you suggest that would work apart from asking all Scenery designers to avoid using &? There must be other XML files which need file and path names, so how are they managed? Pete
flying-w Posted August 21, 2016 Author Report Posted August 21, 2016 On 8/21/2016 at 10:12 AM, Pete Dowson said: There must be other XML files which need file and path names, so how are they managed Expand Here's how FSX Steam Edition is managing the dll.xml. This is the location of my SimConnect DLL: Test 1, use a raw "&" character in the dll.xml entry: <Launch.Addon> <Name>SuperTrafficBoard Server</Name> <Disabled>False</Disabled> <ManualLoad>False</ManualLoad> <Path>E:\Program Files (x86)\FlyingWSimulation\SuperTrafficBoard Data Server for FSX and FSX Steam Edition (Standalone)\STBServer&1\STBServer.dll</Path> </Launch.Addon> Results: The DLL is not loaded. If I run a simconnect server trace, there's no mention of the dll.xml anywhere to be found which isn't normal. Test 2: Escape the "&" character using "&": <Launch.Addon> <Name>SuperTrafficBoard Server</Name> <Disabled>False</Disabled> <ManualLoad>False</ManualLoad> <Path>E:\Program Files (x86)\FlyingWSimulation\SuperTrafficBoard Data Server for FSX and FSX Steam Edition (Standalone)\STBServer&1\STBServer.dll</Path> </Launch.Addon> Results: The DLL is loaded: I guess this ultimately depends on your intention for the runways.xml. If it is just for people to read, no problem. If it is for applications to read, they may run into problems using the standard XML classes/libraries to do so. Simon
moskito-x Posted August 21, 2016 Report Posted August 21, 2016 Hi Pete, for your information there may be also other problems with ORBX files a user in the PRO-ATC/X forum "To be honest, I'm more worried about why P3D is crashing when I try to load it. " Summary of steps user has done. installed ORBX sceneries slight problems with PRO-ATC/X runs older version of MakeRwys so I asked to update to new version. updated to 4.6.9.7 after new run of MakeRwys -> P3D can not be started - crashed immediately asks for help so I removed all ORBX from scenery.cfg (he sends me a ziped scenery.cfg ...) immediately P3D can be started again. a new installation of ORBX and again run of MakeRwys has no longer causes P3D to crash ! looking into users old and new scenery.cfg I noticed last Install has not installed ORBX!VECTOR_FixedAPT . Can be that's the reason P3D now not crash. Thomas
Pete Dowson Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 10:51 AM, flying-w said: Escape the "&" character using "&" Expand So that's how to include a textual & in an XML file? If so, that's all I needed, thanks. BTW what does the "amp; part supposed to mean? Seems quite complicated compared to, say, C's method fo for exaple including textual \ using \\. Pete
moskito-x Posted August 21, 2016 Report Posted August 21, 2016 http://support.esri.com/technical-article/000005870 Thomas
Pete Dowson Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 12:52 PM, moskito-x said: http://support.esri.com/technical-article/000005870 Expand Thanks. Pete
flying-w Posted August 21, 2016 Author Report Posted August 21, 2016 On 8/21/2016 at 12:39 PM, Pete Dowson said: So that's how to include a textual & in an XML file? If so, that's all I needed, thanks. Expand As far as I know, that's it, and as confirmed by the link above. On 8/21/2016 at 12:39 PM, Pete Dowson said: BTW what does the "amp; part supposed to mean? Seems quite complicated compared to, say, C's method fo for exaple including textual \ using \\. Expand I imagine there's some global standards body somewhere that decide this format is the one. "&" is the escape character, something special is coming. "amp" means we want to present an "&" character in the data. ";" means we have finished escaping. Thanks Simon
Pete Dowson Posted August 21, 2016 Report Posted August 21, 2016 Seems I need to do " ' < and > too! Pete
flying-w Posted August 21, 2016 Author Report Posted August 21, 2016 It's times like this a 5 minute job becomes 5 hours! Simon
Luke Kolin Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 2:39 PM, Pete Dowson said: Seems I need to do " ' < and > too! Expand Are you generating the XML yourself or using a library? Generally speaking, encoding of special/reserved characters is why I never generate XML or JSON myself. Cheers! Luke
Pete Dowson Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 3:13 PM, Luke Kolin said: Are you generating the XML yourself or using a library? Expand My own code. Just a sequence of "sprintf" formatting sections. On 8/21/2016 at 3:13 PM, Luke Kolin said: Generally speaking, encoding of special/reserved characters is why I never generate XML Expand I don't like XML at all. It's over-verbose and cumbersome/complicated, which is one reason, but a bigger reason is that one little error in its syntax often makes the whole lot invalid. I only made the XML files because folks asked for them. On 8/21/2016 at 3:13 PM, Luke Kolin said: or JSON Expand Don't know "JSON". Pete
Luke Kolin Posted August 21, 2016 Report Posted August 21, 2016 On 8/21/2016 at 6:20 PM, Pete Dowson said: I don't like XML at all. It's over-verbose and cumbersome/complicated, which is one reason, but a bigger reason is that one little error in its syntax often makes the whole lot invalid. Expand That's a feature, not a bug :) XML is designed for data interchange, and in most circumstances you want to discard in the case of syntactical invalidity. It's not a bad format for structured data that needs validation with a schema document. The verbosity is a challenge, but at least it compresses nicely. It also is human-readable. In all seriousness, if you're going to emit XML you really should let a library handle all of the encoding for you. You can read about JSON here: http://www.json.org/ It's essentially a way of serializing Javascript objects. Cheers! Luke
Pete Dowson Posted August 23, 2016 Report Posted August 23, 2016 Version 4.968 of MakeRunways is now released, fixing this problem. Pete
flying-w Posted August 23, 2016 Author Report Posted August 23, 2016 Thanks a lot for taking care of this Pete. Simon
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now