This is just a side effect of the main functionality (see the section #2).
For example, you can parse this:
#d(#z, #f(.item, .item, .item, .item, .item))
or this:
#d(#z, #f(.item:5))
and transform
auto result = lmlToHtml(input, LmlHtmlFormat.SPACES_4);
into this:
<div id="d">
<div id="z"></div>
<div id="f">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
</div>
So, the language does not support
- custom attributes.
LineML:
#d(#z, #f(.qw, .item:2, #ds, .sdsdfs))
XML:
<div id="d">
<div id="z"></div>
<div id="f">
<div class="qw"></div>
<div class="item"></div>
<div class="item"></div>
<div id="ds"></div>
<div class="sdsdfs"></div>
</div>
</div>
LineML:
#d(#z, #f(.qw, .item:3(.asd)))
XML:
<div id="d">
<div id="z"></div>
<div id="f">
<div class="qw"></div>
<div class="item">
<div class="asd"></div>
</div>
<div class="item">
<div class="asd"></div>
</div>
<div class="item">
<div class="asd"></div>
</div>
</div>
</div>
You can parse your markup without making HTML.
LineMLNode result = lmlToNode!LineMLNode(input);
But the main purpose of the package is to use LineMLNode
subclasses to generate the trees.
Then, you can populate the objects and use them programmatically any way you want.
Boost
- Pegged - Boost
- fluent-asserts:core (for unit tests) - MIT