hazbenz

XML Query

Recommended Posts

Hi,

I have been using P3DV4 AddOn Manager recently and have hit a problem. The thing is I don't know whether the fault is with the way I structured my custom add-on.xml file or with Addon Manager where I used the "Check Encoding Errors" (I suspect the former:blush:). I am using the add-on.xml to point to the folder where I have the default 737/747/etc from FSX. The problem is that if this add-on.xml is "installed" then I cannot see the pop-up menus from ProATC/x and GSX (or even the default ATC!). I spent quite a bit of time trying to track down the problem but in the end had to go for an uninstall/reinstall of P3Dv4.1. The way I found out the problem was with the add-on.xml was during the reinstall I was adding back only one item at a time and checking the default ATC pop-up window. When I delete that add-on.xml everything works as expected.

Anyway, when I ran the "Check Encoding Errors" in Addon Manager I noticed that either it, or something else, added the following line at the beginning of the add-on.xml:

<?xml version="1.0" encoding="utf-8"?>

I checked the encoding on the xml file and it IS set to UTF-8

I was working under the belief that Addon Manager only checks the files but does not change/edit them? Is that correct?

I know everyone denies they're at fault BUT I can assure you I did not add the line above (at least I never typed it in!). Could another third party addon have added that line?

The whole file is as below:

<?xml version="1.0" encoding="utf-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>Legacy Aircraft</AddOn.Name>
  <AddOn.Description>Content for Legacy Aircraft</AddOn.Description>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>E:\P3D Add-ons\Addons\Simobjects\Airplanes</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>SimObjects</Category>
    <Path>E:\P3D Add-ons\Addons\Simobjects\P3DV4AI</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Effects</Category>
    <Path>E:\P3D Add-ons\Addons\Effects</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Gauges</Category>
    <Path>E:\P3D Add-ons\Addons\Gauges</Path>
  </AddOn.Component>
  <AddOn.Component>
    <Category>Sound</Category>
    <Path>E:\P3D Add-ons\Addons\Sound</Path>
  </AddOn.Component>
</SimBase.Document>

Maybe there is a fault in there, I don't know. Maybe the FSX aircraft are causing the issue.

Anyway, can you check this out and let me know please?

PS, I still use Addon Manager to access the scenery.cfg/add-on.xml so that I can populate FS Commander's scenery database.

 

Cheers

Harry

Share this post


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

Hello Harry,

only if you press "Save" on the P4AO, the config files will be rewritten - all of them, not only those that you have changed. The line in question is the XML text declaration, and yes, P4AO adds it, as it is a soft requirement as per W3C XML spec (http://www.w3.org/TR/xml/#sec-TextDecl  ...should contain). But, again, only if you press "Save".

But be that as it may - this line can never cause the issues that you describe, it is a normal part of any XML file.

One thing to be aware of is, that FSX aircraft are not really compatible with P3D. Yes, you will see something in the sim, but that is just the simulator being its usual docile self, showing you what it can do. What it can not do, and what as a consequence constitutes an error condition in P3D, you will find in the P3D content error log file when you activate that in the P3D General settings.

The next step of your tests should be to remove the Addon Components from the above definition one by one, to identify the item that is causing your problems. 

Btw, how did you check the encoding of the file?

Best regards

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