Syntax - X-ABN/XABN GitHub Wiki
XABN data is intended to be formatted in an indented style – though this is not mandatory. Where this is generated programmatically the convention which should be followed is that each line has a number of leading tab characters equal to the level of the following data in the object hierarchy. Formatting for human readability is a function of any encoding application which should aim to produce reasonable line lengths whilst not spreading content out unduly.
The two types of content in XABN (as with XML) are mark up and data. Mark up is contained in markup tags or the use of quoted text and is identified by four markup character definitions. These are a space or non printable character, “:” (Colon), ‘”’ (Double Quote) and “’” (Single Quote or Apostrophe). These have a meaning analogous to the use of the characters “<”, “>”, ‘”’, “’” and “&” in XML.
A markup tag is a sequence of characters enclosed by a leading white space character and a trailing “:”. Quoted text is a sequence of characters enclosed within matched ‘”’ or “’” characters with the enclosing quote character itself represented within this by being repeated. This format is very familiar to those who use applications such as CSV files and spreadsheet formulas etc. In many cases using enclosing quotes is not necessary for text content.
The basic form of a markup tag is one or more optional control characters followed by a property name. The primary control symbols used are “-” to indicate down one level and “+” (one or more) to indicate up one or more levels. The following example is of data for an element called peopleList containing elements called name which in turn contains elements named title, firstName, middlename, lastName and gender.
(Markup tags are shown in blue and data in red)
Expand for Conversion to XML