ErgoNotes keeps its documents in a format which is a dialect of XML. Thus such documents can be easily created by a third-party application or by using a text editor. Here we’d like to present a brief description of this format in order to help users and developers to read ErgoNotes documents or create them from scratch. Please note that this article is related to Version 2.0 of ErgoNotes file format which is supported starting with ErgoNotes 2.5. You can download the xsd-schema related to this format.
Each ErgoNotes document contains a nested hierarchy of XML tags and subtags with attributes that specify the tree nodes of ErgoNotes document. All document information resides between the <ergonotes> and </ergonotes> root XML tags. The document section are located between the <nodes> and </nodes> and consists of unlimited amount of <node> tags which in their turn contain another <node> subtags and so on.
Here is a list of attributes allowed for
<node> element:
| Attribute | Allowed values | Use | Description |
| guid | GUID | optional | Specifies the unique identifier of the node |
| name | string | required | Specifies the name of the node |
| text | string | optional | Specifies the description of the node |
| image | integer | required | Specifies the icon identifier of the node |
| expanded | true | false | optional | Indicates that the node is expanded |
| addtext | true | false | optional | Causes adding node's description to its name when viewed in a tree |
| selected | true | false | optional | Indicates that the node is currently selected |
| encrypted | true | false | optional | Indicates that the node is encrypted |
| type | normal | alarm | optional | Specifies the type of the node |
Each <node> element may contain TEXT and CDATA sections as well. The TEXT section inside a <node> element represents the node’s description unless a text attribute is specified. In this case, node’s description it taken from the text attribute of the <node> element.
If an encrypted attribute is set to 'true' the CDATA section inside the element should contain encrypted node content and no other elements should be nested within this element.
Here is an example of a simple ErgoNotes document:
<?xml version="1.0" encoding="utf-8"?>
<ergonotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ergonotes.com/XMLSchema/v2.xsd http://www.ergonotes.com/XMLSchema/v2.xsd" xmlns="http://www.ergonotes.com/XMLSchema/v2.xsd">
<nodes>
<node guid="ace1e8b8-4cbf-4fbb-bb43-756e06a78416" name="Root node" image="186" expanded="true">
This is a text of the root node
<node guid="8ab482bc-cfd9-4cef-9379-6ea4bac7a061" name="TO DO" image="35" selected="true" text="This node is selected" />
</node>
</nodes>
</ergonotes>