Если кто-то ищет менее многословную альтернативу XML, которая более или менее изоморфна XML, то существует AXON . Для объяснения рассмотрим примеры эквивалентных представлений в XML и AXON. Существует также библиотека Python pyaxon , которая поддерживает формат AXON.
XML
<person>
<name>Alex</name>
<age>34</age>
<email>mail@example.com</email>
</person>
AXON
person {
name {"Alex"}
age {34}
email {"mail@example.com"}}
XML
<memo date="2008-02-14">
<from>
<name>The Whole World</name><email>us@world.org</email>
</from>
<to>
<name>Dawg</name><email>dawg158@aol.com</email>
</to>
<message>
Dear sir, you won the internet. http://is.gd/fh0
</message>
</memo>
AXON
memo {
date:2008-02-14
from {
name{"The Whole World"} email{"us@world.org"}}
to {
name{"Dawg"} email{"dawg158@aol.com"}}
message {"Dear sir, you won the internet. http://is.gd/fh0"}
}
XML
<club>
<players>
<player id="kramnik"
name="Vladimir Kramnik"
rating="2700"
status="GM" />
<player id="fritz"
name="Deep Fritz"
rating="2700"
status="Computer" />
<player id="mertz"
name="David Mertz"
rating="1400"
status="Amateur" />
</players>
<matches>
<match>
<Date>2002-10-04</Date>
<White refid="fritz" />
<Black refid="kramnik" />
<Result>Draw</Result>
</match>
<match>
<Date>2002-10-06</Date>
<White refid="kramnik" />
<Black refid="fritz" />
<Result>White</Result>
</match>
</matches>
</club>
AXON
club {
players {
player {
id:"kramnik"
name:"Vladimir Kramnik"
rating:2700
status:"GM"}
player {
id:"fritz"
name:"Deep Fritz"
rating:2700
status:"Computer"}
player {
id:"mertz"
name:"David Mertz"
rating:1400
status:"Amateur"}}
matches {
match {
Date{2002-10-04}
White{refid:"fritz"}
Black{refid:"kramnik"}
Result{"Draw"}}
match {
Date{2002-10-06}
White{refid:"kramnik"}
Black{refid:"fritz"}
Result{"White"}}}}