Jump to content
Sign in to follow this  
n4gix

XML - How do you do it?

Recommended Posts

Guest Captain Geoff

Thanks for the gauge - I tried it, but I get the same behavior if I use it or the reload keyboard command. It just seems that FS loses it's mind and refuses to reload the panel (correctly). I'd say about 90% of the time the reload works. For the rest I have to re-start FS9. I can live with it. Now if I could only find out what is wrong with the hoist's up code....Senior Captain, Pier Glass Aviation

Share this post


Link to post
Share on other sites
Guest Captain Geoff

Well - here's a straightforward question -in the section where I do the test for the current time being greater than the winch_timer time - how often is this actually entered? I was thinking it was once per second but maybe it is not so?Edit: And the answer is no it is not. I had to set up another 1 second timer so that the code would only execute once per second.I now have a properly functioning three position hoist activation switch that produces an audio output and retains it's cable payout so that if you extend the hook for 20 seconds, it only takes 20 seconds to retract it.Woo Hoo! Wow! talk about a learning curve. I advise anyone using FSPS to be wary of it's XML parsing and changing of files. That was only about one hour per line of code!Thanks for all your help folks! Much Appreciated.Senior Captain, Pier Glass Aviation

Share this post


Link to post
Share on other sites

Which might explain why Jan (and me too !) still develop XML the oldfashioned way, with Notepad :-)And use InternetExplorer as syntax checker.In general, it wouldn't be the first time that a "tool" introduces more problems than it solves :-)Although I can't tell if this is the case with FSPS.Cheers, Rob

Share this post


Link to post
Share on other sites
Guest Captain Geoff

In FSPS, Edit the gauge, and then edit the XML - I set it to bring up Notepad with the xml file in it.No matter how you format in Notepad (I like to use tabs rather than spaces for indentation), it (FSPS) reformats the xml itself replacing the tabs with spaces which makes it hard to tell which <> goes with which > type of tag.As I said above, if there is an error in the xml it doesn't like, it tends to remove any code near or after it, and substitutes its own > type tags. So, for instance, I had a syntax error in the area, and *all* of the area of text disappeared because it was after the error. I can think of many different ways to point out an error without eliminating code that had nothing to do with it. Strikes me as lazy programming. Meanwhile I was going nuts because the switch's visuals and/or behavior was wrong. It wasn't until this morning (after a good night's sleep) I realized what FSPS was doing.But now I, and anyone who reads these posts, knows of this bizarre behavior and hopefully this will help those folks avoid the same traps and frustration I was feeling for the past several days.Senior Captain, Pier Glass Aviation

Share this post


Link to post
Share on other sites

Hi, Geoff...It's very difficult to tell from a distance, but I think you may be introducing the problem by editing .xml files with FSPS while FS9 is active.FWIW, I use FSPS, too, but I prefer to do my initial gauge creation and testing a slightly different way.I use NotePad to create an .xml file and name it something like "TEST 1 hyd sys.xml". Then I install it in FSPS. If it won't show up in FSPS, there are missing graphics or a .bmp labeling problem, so that has to be fixed first.Next, with the "TEST 1 hyd sys" gauge properly placed in FSPS, I start FS9 or reload the panel if FS9 is already running. The gauge may show up in the FS9 panel or it may not. It might be there but not work correctly. Either way, I go back to NotePad and modify the .xml file, then save it as "TEST 2 hyd sys.xml". Then I use the swap feature in FSPS to replace the TEST 1 gauge with the modified TEST 2 gauge. Save FSPS. Reload the FS9 aircraft & panel. Repeat as necessary, changing the number and swapping the gauge each time.That process continues until the coding is completely finished. At that point, the last TEST ?? file is renamed, for example, "hyd sys.xml". A copy of the finalized gauge files is saved separately from FS9 and all the intermediate files are deleted. Use FSPS to swap the last TEST file with the final version and the job's done. (Btw, do NOT try to rename the last TEST file or both FSPS and FS9 will prevent the name change.) With modifications of a .bmp file, you can ignore FSPS entirely. Just modify the bitmap and reload the aircraft. Since the file hasn't changed names, FSPS doesn't come into play. Just remember to refresh FSPS later, after the final modification. There are probably many ways to create and test gauges using FSPS and FS9. I'm not saying this is the best way, but it works well for me.Good luck,Glenn

Share this post


Link to post
Share on other sites

Personally, I'd forget about the so-called XML Editor in FSPS entirely.Use FSPS for what it was originally intended: design and edit panels... ;)If you are just looking for a decent XML Editor for checking syntax and formatting, use XMLnotepade.exe 2007:http://www.microsoft.com/downloads/details...&displaylang=enUse the DTD supplied with the FS9 SDK: gauges.dtd and you will have a nicely behaved XML editing setup... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

Hi Bill,Just intalled and tried XMLnotepad. Seems very similar to ACE editor, a tree-style format, not suitable for me (too slow to work with :-( ) ; I prefer to use UltraEdit32, a powerful text editor that accepts XML schemas; and test the file with Internet Explorer.Thank you anyway for the link :-)Tom

Share this post


Link to post
Share on other sites

>Hi Bill,>>Just intalled and tried XMLnotepad. Seems very similar to ACE>editor, a tree-style format, not suitable for me (too slow to>work with :-( ) ; I prefer to use UltraEdit32, a powerful text>editor that accepts XML schemas; and test the file with>Internet Explorer.>>Thank you anyway for the link :-)No problem. I know that everyone will have different priorities and preferences, but it's always nice to have choices... :-beerchug


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...