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 :)
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.
My tool of choice is Oxygen XML. You can get a 30 day, fully functioning trial here: http://www.oxygenxml.com/register.html.
The tutorial is made with Oxygen XML.
Ensure that there is both a FOLDER named TestMap, and your original (unaltered) map file in the source directory (Test, in my case), like this:
Open the TestMap folder, and check out the contents. The ONLY file we will be touching is the Document.xml source file:
STEP 5: Open Document.xml in your XML editor of choice (see my preferences above).
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:
Wallah! Clean looking raw XML.
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!
OK, so we are finally there!
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.
Rinse and repeat as needed.
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.
Here is the final, reordered Map Index content:
Thanks for sharing this - you've obviously put a lot of work into it. I'll have a play with it in a few days when I have a bit more time.
I agree that it would be nice to have a native XML editor in MM, though for the time being I'd be happy with a simple facility to sort and rearrange marker and tag groups!
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:
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:
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:
- 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.
I think you are right, the choice of method depends on how many groups you have, and how many copy and paste operations you would need to "bubble sort" them into the right order.
At this point, it only takes me about 5 minutes to do the XML operation I described, so in most cases I would find it easier to stick with my model. That said, multiple options are always better!
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.