-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|528|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Showcase Home -> Apps and Utilities


 
HoboBen
Created : 12 September 2017
Edited : 12 September 2017
System : Cross Platform
Language : Python

Bach - like XML, but easier to read and write



Bach on GitHub
'So after seven months I'm finally pretty happy with the status of this and I'm pleased to show it off properly '

Bach is a document markup language that is fully interoperable with your existing XML-based tooling -- but it's a lot nicer to read and write!

Use Bach with all the powerful tools you expect, like XLST, XQuery, DTD and XML Schemas.

Use special shorthand attribute syntax, configurable at parse-time, to extend the language!

Example document

Configured where '#foo #bar' is expanded to tags='foo bar'.

e.g. cat input.bach | python3 bach2xml.py -s '#tags' > output.xml


 

Comments


Tuesday, 12 September 2017, 05:31
Jayenkai
If I'm honest, readability isn't my main issue with xml. It's the absolute insanity of having every bit repeated as both the open and close bracket.
If you want..
<thisismyscore>1</thisismyscore>
It all gets stupidly oversized, very quickly.

Yours looks a LOT neater!
Now, if we could just fix the online " vs ' vs actual " and actual ' issue without resorting to crazy backslashes all over the damn place

Good luck with this, though.
It is, indeed, much more readable.

(Except for the extra bracket at the end of the first "content" line)
Tuesday, 12 September 2017, 10:59
HoboBen
Aha I was wondering what was up with the quotes :o and well spotted thanks!

Edit: like did socoder change my quotes? Or do you mean in my language? Because you can also use square brackets to quote!
Tuesday, 12 September 2017, 11:36
Jayenkai
Using square brackets sounds much more useful.
Still would break bbcode and array stuff, so would require backslashes, there, but at least you could type "It's" without fear of your whole site imploding!!!