#markup-language #xml-parser #parser #xml

bin+lib hml-rs

Markup language events and readers, supporting 'human markup language'

3 unstable releases

new 0.3.1 Jan 24, 2025
0.3.0 Jan 5, 2024
0.0.2 Aug 9, 2021

#2181 in Parser implementations

Download history 22/week @ 2024-12-09 96/week @ 2025-01-20

96 downloads per month

MIT/Apache

155KB
3.5K SLoC

hml-rs

A parser for human-readable markup language, which is in large part equally powerful with XML.

An example file is:

; The toplevel element is the library, which contains 'dvd' elements
; each dvd element should have a title and other data, and contents of director(s), producer(s) and actor(s)
; an actor should be named and have a part
#library
##dvd title="Wizard of Oz" release_date="15 Aug 1939" running_time="101"
###director name="Victor Fleming"
###actor name="Judy Garland"       part="Dorothy"
###actor name="Frank Morgan"       part="The Wizard"
###actor name="Ray Bolger"         part="Scarecrow"
###actor name="Bret Lahr"          part="Cowardly Lion"
###actor name="Jack Haley"         part="Tin Man"
###actor name="Margaret Hamilton"  part="Wicked Witch of the West"
###actor name="Billie Burke"       part="Glinda the Good Witch of the North"

##dvd title="Gone With the Wind" release_date="15 Dec 1939" running_time="221"
###director name="Victor Fleming"
###actor name="Clark Gable"         part="Rhett Butler"
###actor name="Vivien Leigh"        part="Scarlett O'Hara"
###actor name="Leslie Howard"       part="Ashley Wilkes"
###actor name="Olivia de Haviland"  part="Melanie Wilkes"

##dvd{ title="Mr. Smith Goes to Washington" release_data="17 Oct 1939" running_time="125"
#director name="Frank Capra"
#actor    name="Jean Arthur"    part="Clarissa Saunders"
#actor    name="James Stewart"  part="Jefferson Smith"
##dvd}

Usage

Add this to your Cargo.toml:

[dependencies]
hml-rs = "0.3.0"

Releases

Release notes are available in RELEASES.md.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.3–1MB
~21K SLoC