| Crates.io | parco-xml-macros |
| lib.rs | parco-xml-macros |
| version | 0.2.1 |
| created_at | 2026-01-12 00:29:52.727852+00 |
| updated_at | 2026-01-18 19:28:38.507955+00 |
| description | Parco XML Macros |
| homepage | https://github.com/williamcparks/parco-xml |
| repository | https://github.com/williamcparks/parco-xml |
| max_upload_size | |
| id | 2036769 |
| size | 20,544 |
Parco XML is a zero-copy XML serialization library that targets Exclusive XML Canonicalization i.e: exc-c14n for Rust that also exports quick_xml to handle deserialization
use parco_xml::{Xml, xml};
struct MyXML<'a> {
id: &'a str,
value: &'a str,
}
// automatically impl `Xml` trait
xml! {
// ref indicates you have a lifetime in your type
// write `use MyXML;` if you don't have a lifetime
ref MyXML;
// place your namespaces here
@ns {
myxml = "uri:myxml",
}
myxml:Element my_const_attr="constant" id=(self.id) {
(self.value)
}
}
Render Nothing: Empty
Render conditionally via option: Conditional
Render many elements: List