Re: Alternative for XML
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 16, 2003
- 492 views
----- Original Message ----- From: "Tommy Carlier" <tommy.carlier at pandora.be> To: "EUforum" <EUforum at topica.com> Subject: Alternative for XML > > > I've created a markup language as an alternative for XML. I call it SMEL > (Some Modest Extensible Language). It behaves a bit like XML, but it's more > compact, and has some advanced features that XML doesn't have. To my > opinion, it's also more human-readable, especially for programmers. > > I'm also making a Euphoria-library for reading and writing SMEL-documents. > Is this a good idea? Would Euphoria-programmers use SMEL, or would they > prefer using XML? > > Example: the XML-fragment: > > <?xml version="1.0"?> > <data> > <element attribute="value" attribute2="value2">Some data</element> > <empty/> > </data> > > translated into SMEL: > > <smel version="1.0"> > data > { > element(attribute="value",attribute2="value2"){"Some data"} > empty; > } > Interesting. I've been playing with something very similar for use with win32lib. Your syntax is more inclusive than I need but it might be worth me standardizing on SMEL. Also, you might also like to consider non-text attribute values, and removing the '=' symbol. For example ... <smel version{1.0}> data { element(attribute{value},attribute2{value2}){"Some data"} empty; } For win32lib, I could do something like ... <smel version{1.0}> form{ control{type{Window}, caption{Hello, World!}, left{12}, top{10}, width{300}, height{300}, flags{WS_VISIBLE, WS_DLGFRAME} }, control{type{EditText}, name{UserId}, left{5}, top{5} width(units{char}){20} } control{type{Button}, caption{Close}, flags{autoclose}, left(from{UserId}){2}, bottom{5} } } ...hmmmm... I'll think about it some more. -- Derek