Skip to content

Add an option to bubble up all namespace declarations to the root #81

@gsurrel

Description

@gsurrel

Loading and saving Flat LibreOffice Text document makes it unreadable:

fn main() {
    let xml = std::fs::read_to_string("template.fodt").expect("Failed to open");
    let doc = sxd_document::parser::parse(&xml).expect("Failed to parse");
    
    let mut output = Vec::new();
    sxd_document::writer::format_document(&doc.as_document(), &mut output).expect("unable to output XML");
    std::fs::write("output.fodt", &output).expect("Failed to write");
}

The very minimal template file is attached (but zipped because of Github).

template.fodt.zip

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions