The Practical Data and Markup Language (PDML) is a simple yet versatile text format you can use to encode data and/or markup of any complexity.
PDML code is succinct, easy to read and write, and built by humans for humans.
Data Example
Here's a simple data structure shown in XML, JSON, and PDML:
<?xml version="1.0" encoding="UTF-8"?>
<server_config>
<name>Office Server</name>
<address>
<ip>192.168.1.1</ip>
<port>8080</port>
</address>
</server_config>
{
"server_config": {
"name": "Office Server",
"address": {
"ip": "192.168.1.1",
"port": "8080"
}
}
}
[server_config
[name Office Server]
[address
[ip 192.168.1.1]
[port 8080]
]
]
Markup Example
Consider the following HTML code:
<div>
<p>We can write text in <b>bold</b>, <i>italic</i>, or <b><i>bold and italic</b></i>.</p>
</div>
In PDML, the same markup (i.e. formatted text) is written as follows:
[div
[p We can write text in [b bold], [i italic], or [b [i bold and italic]].]
]
Both versions are rendered equally: We can write text in bold, italic, or bold and italic.
Specification, Library, and CLI Tool
On this website you'll find:
-
The Core PDML specification: a portable, programming-language-agnostic and open standard specifying the rules to encode data and markup as plain UTF-8 text.
-
A free and open-source (FOSS) reference implementation, written in Java.
-
A FOSS command line tool, called PDML Companion (running on Windows, Linux, and MacOS), which you can use to carry out various operations on PDML documents.
Besides a simple and concise syntax, PDML also provides a unique set of optional yet powerful features (extensions) to further enhance its practicality.
For more information and examples, please read PDML Overview.