File Structure

Like many XML formats the order of items is relatively loose as long as it sticks to the overall plan. In a UMarks file everything is nested within the root element <umarks>. The running order of the sub elements is as follows:

  1. Global timestamp
  2. Containers
  3. Separators
  4. Links

Within each of these groupings the elements can be listed in any order. For example, as long as the <link> tags are grouped together, at the end after all other elements, they can be added in any order as they contain location information within each individual <link> tag itself i.e. the location of the link in the user’s overall bookmark hierarchy. The same goes for containers and separators.

An example

Take a look at this simple bookmark collection:

01 News
09 Books
11 ....................................
12 Development

And in its expanded form:

01 News
02 UK News
03 >> BBC News
04 ....................................
05 >> Telegraph Online
06 >> Guardian Online
07 US News
08 >> CNN
09 Books
10 >> Amazon UK
11 ....................................
12 Development
13 >> W3C

The elements in bold are containers, and the strings of dots are separators.

This would be listed in a UMarks file as follows:

00 Global Timestamp  
<!-- CONTAINERS -->
01 News /News/
02 UK News /News/UK News/
07 US News /News/US News/
09 Books /Books/
12 Development /Development/
<!-- SEPARATORS -->
04 ..................... /News/UK News/Separator
11 ..................... /Separator
<!-- LINKS -->
03 BBC News /News/UK News/BBC News link
05 Telegraph Online /News/UK News/Telegraph Online link
06 Guardian Online /News/UK News/Guardian Online link
08 CNN /News/US News/CNN link
10 Amazon UK /Books/Amazon UK link
13 W3C /Development/W3C link

Therefore, we list the global timestamp followed by containers, then separators, then links.

As noted, the running order within groups – such as all the links – needn’t be preserved. Each container, separator and link contains independent location information. So the links above could be listed like so:

<!-- LINKS -->
13 W3C /Development/W3C link
08 CNN /News/US News/CNN link
05 Telegraph Online /News/UK News/Telegraph Online link
03 BBC News /News/UK News/BBC News link
10 Amazon UK /Books/Amazon UK link
06 Guardian Online /News/UK News/Guardian Online link

This means new links, for example, can just be added to the end of the file.

UMarks Logo