# inline-xml
Inline XML data directly into your Rust code.
## Example
``` rust
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}");
}
```
## Syntax issues
Since Rust will tokenize the input and [`proc_macro_span`](https://github.com/rust-lang/rust/issues/54725) is not stabilized,
whitespace will be discarded and therefore inline_xml has to guess about where to put whitespace when printing.
## TODO
- [ ] Eliminate usage of `Content::Nested` completely
- [ ] More documentation
- [x] Mention, in the docs, that struct Xml can take multiple tags
- [x] Make struct Tag an instance of trait ToXml
- [x] Arg -> Attr, args -> attrs
- [x] Fix XML injection for attributes
- [x] Fix interpretation of floating point literals
- [x] Somehow produce XML & DTD declarations (probably as a format arg)
- [x] Namespaces (eg. `<a:x>asdf</a:x>`)