How to rearrange Icon and Tag Groups in Map Index

At the request of some other folks, I am writing down the method I used to rearrange the Icon and Tag Groups within the Map Index. This is most certainly an unsanctioned method for manipulating your Map, so buyer (or practitioner) beware.

NOTE: Your map should be backed up before attempting any of this because XML is rather easily messed up and it could completely corrupt your map if you cut and paste the wrong thing. That said, this process is fairly straight forward if you stick to the steps.

I am going to put each step of the process as a separate reply in this thread in case there are questions on particular parts - you can put comments in the proper place :)

First, you'll need to get a program that can manipulate XML, which the core document in your map – Document.xml – is made out of.

I had considered using a free tool (XML Notepad by Microsoft, for example - http://www.microsoft.com/en-us/downlo...) to do this manipulation, but to be honest it makes a lot more sense to use a more fully functional tool instead.

I found, after the fact, that I couldn't edit my original post and I forgot a critical ease-of-use note that belongs at the beginning of this process.

Considering that you are trying to rearrange the Map Index content, it would be really helpful to have a screenshot or manual list of what order everything is in BEFORE you start.

Secondly, I would suggest creating a manual list of what order you want everything to be in AFTER your process is all done; Since you won't be able to open the map mid-process, making these lists before hand will make your life infinitely easier - especially if, like me, you have 50 groups to rearrange!

NOTE: In OxygenXML editor you will get a warning about the long length of the lines, which you can safely click "Continue" on.

In order to make the document about 1,000 times easier to work with, I always make it a habit of MAKING THE PROGRAM format the document. IN OxygenXML, click the icon shown below, whichappears right above the raw XML text:

OK, now that we are all set up, you will need to take a look at the existing file setup so that you can get your bearings. Get out your screenshot or list of your ORIGNAL map index contents so you can see where they “come from” during this step.

Here is my map’s initial index. The yellow Tag Groups are what I am going to rearrange in this tutorial so that they are listed in numerical order: One, Two, Three.

In OxygenXML editor, there is a small tool pane called the “Outline”, located in the lower left hand side of the interface, which is where all of your editing will take place. Here it is:

The Icon Groups and Tag Groups are stored next to each other in two “peer” sections of the map. The rearrangement of either content is an identical process, but for the sake of simplicity I am going to focus on the Tag group in my tutorial.

Navigate to the section of the map by clicking the arrows next to the following nodes:

ap:Map (probably already expanded by default)ap:MarkerSetGroup (the parent of the Icon and Tag Groups)

At this point you should see this, below.

The sections you could be interested in are highlighted in yellow, ap:IconMarkerSets and ap:TextLabelMarkerSets.

ap:IconMarkerSets contain the Icon Groups, which use the graphical icons. The ap:TextLabelMarkerSets contain the text-based Tag Group contents.

This is the most dangerous part of the process, because it is the most likely to accidentally be done incorrectly
Because I am interested in rearranging the Tag Groups, I need to expand the ap:TextLabelMarkerSets node to expose the three groups I have created before the tutorial began.

These three highlighted notes correspond to the three Tag Groups I highlighted at the beginning of the tutorial: “One”, “Two”, and “Three”, which are, currently, out of order in the index.

So, the question is this: how do I know which one is which – they all look the same!

This is where the different programs handle editing differently, and your steps WILL be different if you are not using OxygenXML editor. In OxygenXML, it is a simple process. Simply click on each one of the ap:TextLabelMarkerSet nodes, in turn, and the editor will automatically bring the content into focus, and highlight in blue, in the main editing interface.

When I click on the first ap:TextLabelMarkerSet in the list (from the top), this is what gets highlighted in the main editor window:

Notice that the red-circled section shows that the “Name” attribute of this group is “Three”, which is in fact what I would expect from my original map design. You can also look just down the page and see the next group name, in yellow highlight, “One”. Clicking on the second node in the Outline would highlight that content, and so forth.

Get ready to hold your breath because the next step makes and commits the changes!

Take a look back at your notes or screenshot to see which order your groups need to be in. We are going to “drag and drop” the groups from one location to another.

NOTE: Do NOT try and cut-and-paste this operation! Do the drag-and-drop method. It is far too easy to mess up XML (this comes from an experienced developer who is speaking from experience)

Since we are already familiar with the order of the groups because of the previous step’s inspection, we can just start putting things in the right location. Read all of the following description BEFORE doing anything!

In the OxygenXML editor, Outline pane, left-click and HOLD the node you want to drag. You will see a small black underline appear, which indicates where the content would be placed if you let go of the left mouse button. Move your mouse until the black indicator line appears where it should be located and let go of the mouse.

NOTE: You may find that pausing even for a moment over another node will automatically expand it’s content. Don’t worry about it – just keep your eye on the location it should be put.

The drop location SHOULD look like this (black UNDERLINE) – it means it will be put BETWEEN the two nodes it appears BETWEEN:

The drop location SHOULD NOT look like this (black OUTLINE) – this indicates the content will be put INTO the node it is hovering over!

FINALLY let go of the content when it appears in the right place.

Click through each of the ap:TextLabelMarkerSets nodes and glance over at the “Name” property as shown above to verify that the content has been properly rearranged. If not, move it again.

Now that all the edits have been made, Save the Document.xml file and confirm changes. Close your editing program.

From within the TestMap folder in Windows Explorer, select all files and folders, using Ctrl-A. You should see all files selected:

Without clicking on anything first, right-click on the highlighted files, and from the context menu, select “Add to archive” from the WinRAR menu, as shown below.

You can consolidate the last two steps, which is creating a new archive file from all of the existing contents using the ZIP format, and renaming the new ZIP file with a .mmap extension. By default, WinRAR will name the new archive file for the directory name it is currently in. You can changes as necessary. You can also rename the file extension to .mmap after creating the archive if you feel more comfortable doing that.

Here are those selections in my Save dialog when consolidating those two steps:

After that you should see the newly modified map file in the same folder:

At this point it is a fully functional, normal map that can be opened and inspected within MindManager! You may want/need to give it a new name, then put it back in the original folder, one directory up, so that the relative hyperlinks don’t get messed up, but that is all on you.

Actually I think I may have just found a way to rearrange marker groups in the Map Index without using XML.

Assume you have three tag groups in the Map Index named and ordered the same way Mike has used in his example:

Three

One

Two

To move group Three to the bottom, first copy the group and then delete it, confirming that yes you do want to delete the whole group.

Then go to the green plus sign at the top of the Map Index tab and click on Paste Marker Group. Icon and Tag groups are always pasted at the bottom of the relevant section, so your tag groups should now be ordered as follows:

One

Two

Three

The main limitations with this approach are that you have to do this one group at a time and that you can only sort by pasting the copied groups to the bottom of the list. Therefore, if you had four groups which were ordered:

Two

Four

One

Three

- you would start by copying, deleting and pasting group Two at the bottom, do the same for group Three and then finally deal with group Four to get them in the correct order.

The other thing is that you have to remember always to copy the group, then delete. If you fail to copy first the group is gone forever, so it's probably wise to save a copy of the map before you start the reordering process.

The approach you describe is the way to go if you have a lot of groups and aren't afraid to get your hands dirty with XML. On the other hand if you don't want to play with XML and/or you have only a few groups to organise, the copy-delete-paste method would seem to be the easiest.

I assume the copy group facility is designed primarily for copying between maps and again obviously works best if you have a small number of groups to deal with. I guess that a variation of your XML method could also be used to do this faster too, especially if you had a large number of groups to transfer.