igumnoff / shiva

Shiva library: Implementation in Rust of a parser and generator for documents of any type
https://docs.rs/shiva
GNU General Public License v3.0
161 stars 11 forks source link

XML Generator #26

Closed evgenyigumnov closed 4 months ago

evgenyigumnov commented 4 months ago
  1. Implement "XML Generator" (generate function)
    pub trait TransformerTrait {
    fn parse(document: &Bytes, images: &HashMap<String, Bytes>) -> anyhow::Result<Document>;
    fn generate(document: &Document) -> anyhow::Result<(Bytes, HashMap<String, Bytes>)>;
    }

    Look at json module like example

  2. Units test requered for this new feature (looks at tests in json module)