Jump to content
Sign in to follow this  
Lorby_SI

AddonOrganizer 1.25 released

Recommended Posts

Hello @ll,

after discovering the next violation of the XML spec by a well-known product, I have decided to add an XML sanitizer process to the P4AO.

This process will take a look at all the XML files that are supposed to represent addons, and it will correct all XML tags that are not as required by the specification. This is done to the best of its abilities, and there are still options to screw an add-on.xml up.

I can only urge everyone not to handle these files like simple textfiles, be it manually or programmatically. Use proper XML serializers, obey the encoding rules and make absolutely sure that your tag names are as they should be according to the P3D Learning Center. And take note of the W3C spec what an XML file actually is.

The new P4AO / Addon Organizer version is available for donwload on the Lorby-SI website, section "DOWNLOADS".

Important: I can only test this tool with the addons that I have. So be careful when using it, especially now with the "sanitizer".

Best regards

  • Upvote 4

LORBY-SI

Share this post


Link to post
Share on other sites

Thankyou for this IMHO absolutely essential and free utility.  And also for your commitment to supporting the correct use of addon.xml :)

Cheers K

  • Upvote 1

Kevin Firth - i9 10850K @5.2; Asus Maximus XII Hero; 32Gb Cas16 3600 DDR4; RTX3090; AutoFPS; FG mod

Beta tester for: UK2000; JustFlight; VoxATC; FSReborn; //42

xaP1VAU.png

Share this post


Link to post
Share on other sites

Thanks, Oliver. Can't do without your AddonOrganizer and you make sure we never have to look for alternatives, so win-win. :)

  • Upvote 1

Share this post


Link to post
Share on other sites

Hi all, i sucessfully transferred all of my add-on sceneries over to the XML method and they are all working just fine in the sim .. but upon launch, i get this error when starting up AddonOrganizer

http://prntscr.com/i3o5jy

 

i am brand new to this method so any help would be greatly appreaciated :) thanks

Share this post


Link to post
Share on other sites
7 hours ago, deneantony said:

Hi all, i sucessfully transferred all of my add-on sceneries over to the XML method and they are all working just fine in the sim .. but upon launch, i get this error when starting up AddonOrganizer

http://prntscr.com/i3o5jy

 

i am brand new to this method so any help would be greatly appreaciated :) thanks

Hi,

impossible to tell without looking at the file itself. The error message means what it says, the file that you are trying to read is broken. In line 7, character position 65 there is something that destroys the XML format. Did you check what the P3D content error log has to say about that file?

I know that you are saying "but the simulator reads it fine" now. That may be so, as the sim is determined to extract whatever usable information there is in the file and simply ignores the rest that it can't make sense of. The simulators file parser is not applying the W3C specification, plain and simple. Otherwise it would reject files like these (and the one from ORBX and UltimateTrafficLive too) plus there would probably be a dtd file too. The P4AO on the other hand does, it uses Microsofts XML serializer to read these files, and if they are not as per spec, they will not be read or will throw an error message. I don't think that it would be a good idea to write a management tool that reads (and writes?) broken files. Honestly, I can't understatnd what Lockheed is doing - either you use XML files, then you apply the full set of rules, or you don't - then don't call them XML.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

ok ... you have totally lost me in lingo that is way over my head haha well here is the image of the XML file that default UK2000 writes for the scenery

http://prntscr.com/i3vwdv

 

if you could suggest or guide me on how to setup the addon organizer that would be great :) thanks again

Share this post


Link to post
Share on other sites
16 minutes ago, deneantony said:

ok ... you have totally lost me in lingo that is way over my head haha well here is the image of the XML file that default UK2000 writes for the scenery

http://prntscr.com/i3vwdv

 

if you could suggest or guide me on how to setup the addon organizer that would be great :) thanks again

Hi,

sorry, that picture doesn't help. I suspect that there might be a line feed in there somewhere. Can you send that file to me by email? The address is at the end of the P4AO manual.

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites
12 minutes ago, deneantony said:

done :)

Sorry, must have been blind. It is obvious (see bold text)

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>UK2000 Stansted Xtreme</AddOn.Name>
  <AddOn.Description>UK2000 Stansted Xtreme scenery</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>D:\Prepar3D v4 Add-ons\UK2000\UK2000 Stansted Xtreme</Name>
    <Layer>950</Layer>
  </AddOn.Component>
</SimBase.Document>

This looks like part of the file went missing - the <Path> tag is not closed and the opening <Name> tag is missing entirely

This would be correct

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AddOnXml" version="4,0" id="add-on">
  <AddOn.Name>UK2000 Stansted Xtreme</AddOn.Name>
  <AddOn.Description>UK2000 Stansted Xtreme scenery</AddOn.Description>
  <AddOn.Component>
    <Category>Scenery</Category>
    <Path>D:\Prepar3D v4 Add-ons\UK2000\UK2000 Stansted Xtreme</Path>
    <Name>Whatever Name you want to give it</Name>

   <Layer>950</Layer>
  </AddOn.Component>
</SimBase.Document>

If this really is the file that was supplied by UK2000, please alert the developer that it is very wrong.

In every XML file, the opening <Tagname> and closing </Tagname> must be present. You can stack them into each other, but the opening/closing sequence cannot be broken

Only this is correct:
<Tag1>
   <Tag2>somedata</Tag2>
    <Tag3>somemoredata</Tag3>
    <Tag4>
         <Tag5>someotherdata</Tag5>
   </Tag4>
</Tag1>

This for example is wrong
<Tag1>somedata
   <Tag2>someotherdata</Tag1>
</Tag2>

as are missing tags or wrong tag names. Tag names are case sensitive, so <Tag1></Tag1> is not the same as <tag1></tag1>

Best regards


LORBY-SI

Share this post


Link to post
Share on other sites

thank you ever so much! that seems to have fixed the problem now i dont get any errors and all my scenery shows up in the AddonOrganizer .. great support thanks again

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...