Announcement

Collapse
No announcement yet.

How to compare B.C. xml configuration files?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to compare B.C. xml configuration files?

    On my laptop, I have different releases of B.C.3, the official one and two beta. I would like to be able to compare their xml files, to see if there are some different settings. But when I open the comparison, it shows for example something like (roughly) copyleft yes yes as the first line on one side, and as the tenth line on the other, even if they are the same lines. Which comparison should I use to sort Your xml configuration files?

    Thank You

    Rodolfo Giovanninetti

  • #2
    Hello,

    Are the xml lines actually out of order or is the alignment not quite matching up as you expect? If you perform a manual Align with the right click menu on your two lines, does everything line up as you expect?
    Aaron P Scooter Software

    Comment


    • #3
      As far as I can tell, they are out of order. I will try to manually align section headers, for example the section that has parameters for picture comparison, the section for folders, and so on, and see what happens to lines inside these sections.

      Thank You again

      Rodolfo Giovanninetti

      Comment


      • #4
        I confirm that inside a section, lines are out of order, so it is not easy, at least for me, to compare them quickly. I copy here an example, with the same section taken from B.C. text compare left and right files.

        Thank You again

        Rodolfo Giovanninetti

        Left file:

        <TDirCompareCommands>
        <Items>
        <CollapseSubfoldersAction Value=";True" />
        <CopyAction Value=";True;True" />
        <CopyLeftAction Value=";True;True" />
        <CopyRightAction Value=";True;True" />
        <FavCompareNoneAction Value=";True;True" />
        <FullRefreshAction Value=";;True" />
        <MirrorLeftAction Value=";;True" />
        <MirrorRightAction Value=";;True" />
        <MoveAction Value=";True;True" />
        <MoveLeftAction Value=";True;True" />
        <MoveRightAction Value=";True;True" />
        <MoveSideAction Value=";;True" />
        <MoveToAction Value=";;True" />
        <RenameAction Value=";;True" />
        <VcsGetAction Value=";True" />
        <TogDiffAction Value=";;True" />
        <TogLeftNewerAction Value=";;True" />
        <TogLeftOrphanAction Value=";;True" />
        <TogRightNewerAction Value=";;True" />
        <TogRightOrphanAction Value=";;True" />
        <TogSameAction Value=";;True" />
        <TouchAction Value=";;True" />
        <UpdateBothAction Value=";;True" />
        </Items>
        <ToolbarPosLocked Value="True" />
        <Toolbars>
        <SessionsBar Value="TopDock;;;0" />
        <DisplayFiltersBar Value="TopDock;;;152" />
        <ActionsBar Value="TopDock;;1;311" />
        <EditBar Value="TopDock;;;501" />
        <FileFiltersBar Value="TopDock;;1;0;382;65" />
        </Toolbars>
        </TDirCompareCommands>

        Right file:

        <TDirCompareCommands>
        <Items>
        <CollapseSubfoldersAction Value=";True" />
        <CopyAction Value=";True;True" />
        <CopyLeftAction Value=";True;True" />
        <CopyRightAction Value=";True;True" />
        <FullRefreshAction Value=";;True" />
        <VcsGetAction Value=";True" />
        <DirShowAllAction Value=";;True;;False" />
        <DirCompareStructureAction Value=";;True;;False" />
        <DirFlattenAction Value=";;True;;False" />
        <MirrorRightAction Value=";;True" />
        <MoveLeftAction Value=";True;True" />
        <MoveRightAction Value=";True;True" />
        <MoveSideAction Value=";;True" />
        <MoveToAction Value=";;True" />
        <MoveAction Value=";True;True" />
        <DirCompareFilesOnlyAction Value=";;True;;False" />
        <FavDiffAction Value=";;True;;False" />
        <RenameAction Value=";;True" />
        <FavDiffNoOrphanAction Value=";;True;;False" />
        <FavLeftNewerAction Value=";;True;;False" />
        <FavLeftNewerOrphanAction Value=";;True;;False" />
        <FavLeftOrphanAction Value=";;True;;False" />
        <FavNoOrphanAction Value=";;True;;False" />
        <FavCompareNoneAction Value=";True;True" />
        <FavOrphanAction Value=";;True;;False" />
        <FavRightNewerAction Value=";;True;;False" />
        <FavRightNewerOrphanAction Value=";;True;;False" />
        <FavRightOrphanAction Value=";;True;;False" />
        <TogDiffAction Value=";;True" />
        <TogLeftNewerAction Value=";;True" />
        <TogLeftOrphanAction Value=";;True" />
        <TogRightNewerAction Value=";;True" />
        <TogRightOrphanAction Value=";;True" />
        <TogSameAction Value=";;True" />
        <TouchAction Value=";;True" />
        <UpdateBothAction Value=";;True" />
        <SetAsBaseFoldersAction Value="Ctrl+Alt+B" />
        <RefreshAction Value="None" />
        <RefreshSelectionAction Value="Shift+F5" />
        <ExistsNextAction Value="Ctrl+Down" />
        <ExistsPrevAction Value="Ctrl+Up" />
        <MirrorLeftAction Value=";;True" />
        </Items>
        <ToolbarPosLocked Value="True" />
        <Toolbars>
        <SessionsBar Value="TopDock;;;0" />
        <DisplayFiltersBar Value="TopDock;;1;0" />
        <ActionsBar Value="TopDock;;;152" />
        <EditBar Value="TopDock;;1;603" />
        <FileFiltersBar Value="TopDock;;;605;599;14" />
        </Toolbars>
        </TDirCompareCommands>

        Comment


        • #5
          I've created a tutorial with the content you've supplied above to show you how to compare XML configuration files. You can view the tutorial here:

          Tutorial: Comparing XML configuration files
          BC v4.0.7 build 19761
          ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

          Comment


          • #6
            Thanks a ton, Michael. I can see in the linked forum post that this helped him out.
            Aaron P Scooter Software

            Comment


            • #7
              Yes, Michael has helped me (and other people, I do believe!) with generic .xml files. While You are at a beta stage, would it be possible to change B.C.3 so that, when it writes its own configuration .xml files, it writes them in a sorted order? Or, at least in a fixed order? So, I would still need Your plug in (and, waiting for it, I could use Michael idea), but, at least for B.C.3 own .xml files I could find them already sorted or at least ready made.

              Thank You very much again

              Rodolfo Giovanninetti

              Comment


              • #8
                I have posted an "XML sorted" file format based on Michael's suggestion. It can be downloaded from:
                http://www.scootersoftware.com/v3formats
                Erik Scooter Software

                Comment


                • #9
                  I tried it, and copied a line from the right file to the left one. No, if I try to compare them again (it uses "Default: XML Sorted"), I get an error, that says that the process returned with a non zero exit code. I have also to ask two questions (I will try to RTFM as soon as possible). What is a tidied file? In Your format page I see that there are: "XML sorted and tidied" and "XML tidied with attributes sorted". What are the differences?

                  Thank You very much again

                  Rodolfo Giovanninetti

                  Comment


                  • #10
                    Thanks for the example files; we'll look into this issue.

                    XML Tidied with sorted attributes is an older file format that would sort the attributes but not the nodes of the file.
                    <node attribute1="x" attribute2="y"/>

                    XML Sorted and Tidied is a new rule we are working based on Michael's xslt that will sort all of your nodes, and then tidy the sorted output. This would allow for easy xml comparison in the Text Compare using an external conversion.
                    Aaron P Scooter Software

                    Comment


                    • #11
                      Hello,

                      One of our developers looked over your pair of example files. It looks like your Left example file has been edited outside of BC3. The declaration at the top says UTF-16 but the file is actually UTF-8. We generate our settings files with a UTF-8 declaration in UTF-8, so this may have been changed if you opened the files in another editor and then saved them.

                      If you manually change the declaration back to be UTF-8, it should work for you.
                      Aaron P Scooter Software

                      Comment

                      Working...
                      X