You can download the BML SDK it contains a help file, a few BML example files, and a BML language definition file that should be copied to the Lang subfolder of where you have Source Edit installed.

What is BML?

Brixoft Markup Language or BML is a multipurpose scripting language based on XML. The language exists in different editions and could be adapted to be used as the macro or scripting language for any application or environment. This documentation will only cover the Source Edit edition of BML.

Just like an HTML or XML document BML is based on elements also known as tags, each element can have a number of attributes and a text. Elements can also contain other elements. A BML document must also be well formed (just like an XML document) meaning that each element must have a closing element. However you can use the XML syntax for an element that doesn't contain any children. For example instead of typing: <elementName></elementName> you can use: <elementName />

All BML documents contain a root element, named bml, a header element, named bmlhead, and a body element, named bmlbody. Unlike HTML, BML elements and attributes are case sensitive and in lower case. An attribute value can, however, be case insensitive depending on the implementation of the used BML edition. The attribute value must be enclosed between quotation characters though.

The root element has two different attributes, version and edition. Both are required. The version attribute must currently contain the value "1.0". The value of the edition attribute depends on the implementation. The Source Edit edition only accepts the string "Source Edit". Source Edit will not load a file that doesn't include both these attributes and their respective values.

The bmlhead element doesn't have any required attributes in the standard BML definition. However it is allowed to add requirements to different editions of BML. Source Edit does not use any attributes for the header, however, the header can contain child elements. These are the ones defined in standard BML:

  • version - (Required) Contains the document version. It can contain any version number. The SE Aid (AddIn Editor) will always insert 1.0 for all new files. But you may change that.
  • author - (Optional) The author name.
  • company - (Optional) The company name of the author.
  • email - (Optional) E-mail address to the author or customer service.
  • web - (Optional) Can, for example, contain the authors home page, or a link to other BML resources.
  • description - (Optional) Short description of the file, or other informative text.
Only the version element is required by default but some editions might add other required fields. The Source Edit edition has no other header elements. If you use the Source Edit AddIn Editor (SE Aid) you can edit these fields through the File Properties dialog box.

The body of a BML file is called bmlbody and by default doesn't have any attributes. The body contains all the elements that make up the script or macro. Elements in a BML body are called Actions and the attributes of an Action are called a Property. The actions that are allowed inside a BML body depend on the edition. This documentation will cover all available actions in the Source Edit edition of BML.

The following is an example of a minimal BML file:

    <bml version="1.0" edition="Source Edit">
            Actions that makes up the script goes here

The syntax highlighted code is created using the Code Publisher feature in Source Edit.