Is it possible to Save a Cmap as XML ?

Having problems with IHMC CmapTools? Think you have found a bug? Let us know!
Forum rules
Before you post a problem or bug, please be sure you have included the version number of IHMC CmapTools, the operating system and version, the amount of RAM, and any other information that allows us to be able to replicate the problem you are having. (i.e. what were you doing when the problem occur? were you running another program (application) by the time you have the problem?)
hsfrey
Posts: 10
Joined: Sat Jun 05, 2010 3:34 pm

Is it possible to Save a Cmap as XML ?

Post by hsfrey »

Is it possible to Save a Cmap as an XML or Json file, edit it manually in a text editor, and then reload it for display?

For large maps (and left-brained people), it might sometimes be more convenient to do that rather than use the graphic interface.

The current saved format is not even readable in a text editor.
acanas
Posts: 753
Joined: Tue Mar 17, 2009 5:52 pm

Re: Is it possible to Save a Cmap as XML ?

Post by acanas »

There are 3 XML formats the Cmap can be saved as. With an opened Cmap, use File -> Export Cmap As -> and pick CXL or XTM/XCM.

CXL is an open format described in http://cmap.ihmc.us/xml

XTM is used for Topic Maps.

XCM is old, we use CXL now instead.

See the documentation Cmap at: http://bit.ly/cZGvAY , part of the CmapTools documentation site.

There is an option in the configuration file to save all Cmaps as CXL but you are better off using the Export.
hsfrey
Posts: 10
Joined: Sat Jun 05, 2010 3:34 pm

Re: Is it possible to Save a Cmap as XML ?

Post by hsfrey »

Thank you!
The CXL format is just what I need!

Are the "unique-Id"s that you assign "magic", or can I change them (consistently) to shorter, more readable ones?

As a Newbie, may I ask a few basic questions that I haven't seen addressed explicitly in the docs?

When I'm running your program, am I running on my computer, or am I running as a client under your server over the internet?

Also, within each concept box, I will require hyperlinks into local html files. Does Cmap support that?
I see that you have a search facility, but I need to display pre-specified links in the code.
(My application is analyzing the logic of legal decisions, and every Cmap box needs to have a pointer back to html name anchors in the text of the decision.)
acanas
Posts: 753
Joined: Tue Mar 17, 2009 5:52 pm

Re: Is it possible to Save a Cmap as XML ?

Post by acanas »

Don't change the IDs -- they are used to identify resources and are stored outside of the Cmap. If you change them, links will break and you could have problems with duplicates.

You are running the program on your computer, see: http://bit.ly/9qTJma

You can link resources to the Cmap. Check the Help file (Working with Resources) and the document: http://bit.ly/bqaUho. There are also videos on the site that explain how to do it.

As you can see, there is extensive documentation. Please check it out.
hsfrey
Posts: 10
Joined: Sat Jun 05, 2010 3:34 pm

Re: Is it possible to Save a Cmap as XML ?

Post by hsfrey »

Thank you. Being used to html, I'm not yet used to finding documentation scattered throughout a cmap, hidden until an icon is clicked, and then having to download pdfs and load a reader. It's a new paradigm for me.

But, I successfully added a link to a file on my computer to a Cmap box. :D

However, it ignored the hash (#) link to the internal named anchor. :(

I couldn't tell whether the link was copied without the hash part of the link, because the URL is not included in the CXL file. Instead there is a link to a named resource where it is presumably stored, but I don't know how to find and inspect that resource.

I can't find the resource in either the folder containing the CXL file, or the cmap folder in the application folder in Documents and Settings, or in the folder containing the cmap program.

Can you tell me where resources are stored on my computer? And, are they stored in a format readable by a text editor?

Of course, all that is subsidiary to the main question: Is Cmap currently able to display a named anchor within an html file?

I suppose I could cut up the court's opinion into several hundred individual html files, but I prefer to used named anchors within a single file so that users can explore the context of the sentence the map is linking to.
acanas
Posts: 753
Joined: Tue Mar 17, 2009 5:52 pm

Re: Is it possible to Save a Cmap as XML ?

Post by acanas »

Thank you. Being used to html, I'm not yet used to finding documentation scattered throughout a cmap, hidden until an icon is clicked, and then having to download pdfs and load a reader. It's a new paradigm for me.

But, I successfully added a link to a file on my computer to a Cmap box. :D

However, it ignored the hash (#) link to the internal named anchor. :(
If the link is to a Web page, i.e. a URL, then the URL will not be altered and you can use whatever you want in it. If you are trying to add the Web page file as a resource it won't work. You should try using "Add Web Address..." at the Views window and add the path to the file, with # in it. This won't be altered and will be passed on the OS.

I couldn't tell whether the link was copied without the hash part of the link, because the URL is not included in the CXL file. Instead there is a link to a named resource where it is presumably stored, but I don't know how to find and inspect that resource.

I can't find the resource in either the folder containing the CXL file, or the cmap folder in the application folder in Documents and Settings, or in the folder containing the cmap program.
In the Views window of CmapTools you should be able to see the resource that was created with the URL, and you can look at its properties. CmapTools was designed to be used from its GUI interface, so you should be looking for the resources within the Views. If you try to do all the editing at the file system level for sure you are going to run into problems and we won't be able to help you out -- you are on your own.

All the Cmaps and resources are stored under the "My Cmaps" folder under your Documents or My Documents folder, depending on what OS you are using. The default format of the URL resource is not readable by a text editor.
Of course, all that is subsidiary to the main question: Is Cmap currently able to display a named anchor within an html file?
Cmap does not "display" the URL, it passes the URL to the Web browser. I doesn't parse it or try to do anything with it. Don't try to add the Web page to CmapTools, add a link to it.
hsfrey
Posts: 10
Joined: Sat Jun 05, 2010 3:34 pm

Re: Is it possible to Save a Cmap as XML ?

Post by hsfrey »

Thanks!

I found the "Add Web Address.." link in the context menu obtained when right-clicking the box.

I added the link, and the hash anchor shows on the end of the URL when I look at it in the Views window, as it should.

However, when I click on the link on the Cmap itself, the browser comes up showing the beginning of the file, not the internal named hash anchor, and the hash anchor does NOT show in the browser's address line.

So it looks like Cmap strips the hash anchor from the end of the URL before it passes it to the browser.

Is that possible?
acanas
Posts: 753
Joined: Tue Mar 17, 2009 5:52 pm

Re: Is it possible to Save a Cmap as XML ?

Post by acanas »

Could you post an example? It shouldn't strip it ...
hsfrey
Posts: 10
Joined: Sat Jun 05, 2010 3:34 pm

Re: Is it possible to Save a Cmap as XML ?

Post by hsfrey »

OK, I have a small 2-box Cmap example, but I don't know how I'd post an active Cmap.

What's the best way to do that?

The resource I'm pointing to is rather large. Would it be necessary to upload that as well, or is it enough to have the URL?
acanas
Posts: 753
Joined: Tue Mar 17, 2009 5:52 pm

Re: Is it possible to Save a Cmap as XML ?

Post by acanas »

I was thinking of posting an example of an URL to a Web page on the Internet that wasn't working.

Are all you web pages on your local machine? If so, can you post how you are writing the URLs?
Post Reply