| Crates.io | inline-xml |
| lib.rs | inline-xml |
| version | 0.3.2 |
| created_at | 2023-03-05 12:43:39.383465+00 |
| updated_at | 2023-05-18 01:46:03.268857+00 |
| description | Embed XML data directly in your Rust code |
| homepage | |
| repository | https://git.stuerz.xyz/rustcloud/inline-xml |
| max_upload_size | |
| id | 801314 |
| size | 71,496 |
Inline XML data directly into your Rust code.
use inline_xml::xml;
fn main() {
let value = 42;
let html = xml! {
<html>
<head>
<title>Example</title>
</head>
<body>
<h1>Example</h1>
<p>Hello World</p>
<p>Value: {value}</p>
</body>
</html>
};
println!("{html}");
}
Since Rust will tokenize the input and proc_macro_span is not stabilized,
whitespace will be discarded and therefore inline_xml has to guess about where to put whitespace when printing.
Content::Nested completely<a:x>asdf</a:x>)