Crates.io | xmlb |
lib.rs | xmlb |
version | 1.0.0 |
source | src |
created_at | 2020-11-09 19:11:37.199509 |
updated_at | 2020-11-09 19:11:37.199509 |
description | XML but with brackets |
homepage | https://gitlab.com/8BitKitKat/xmlb |
repository | https://gitlab.com/8BitKitKat/xmlb |
max_upload_size | |
id | 310436 |
size | 13,566 |
XML but with Brackets
<root>
<foo1>Some text</foo1>
<bar thing="4"/>
<!-- Comment 1 -->
<!-- Comment 2 -->
<baz foo1="bar1" foo2="bar2" foo3="3">
<foo2>
Some more text
<!--
Multi
Line
Comment
-->
</foo2>
</baz>
</root>
Becomes
<root> {
<foo1> { Some text }
<bar thing="4">
// Comment 1
// Comment 2
<baz foo1="bar1" foo2="bar2" foo3="3"> {
<foo2> {
Some more text
/*
Multi
Line
Comment
*/
}
}
}
XML But with Brackets!
use xmlb::XMLBFile;
fn main() {
let source: String = xmlb_source_code;
let xmlb_file = XMLBFile::from_string(source);
// Convert to xml
let xml = xmlb_file.to_xml(true); // true or false to keep comments or not
}