mirror of
https://github.com/mbilker/kbinxml-rs.git
synced 2026-09-08 18:45:18 -05:00
bin: move hierarchy printing up before printing text xml
This commit is contained in:
@@ -125,11 +125,11 @@ fn main() -> std::io::Result<()> {
|
||||
file.read_to_end(&mut contents)?;
|
||||
|
||||
if KbinXml::is_binary_xml(&contents) {
|
||||
Printer::run(&contents).unwrap();
|
||||
|
||||
let (element, encoding_original) = KbinXml::from_binary(&contents).map_err(display_err)?;
|
||||
//println!("element: {:#?}", element);
|
||||
let text_original = to_text(&element)?;
|
||||
display_buf(&text_original)?;
|
||||
Printer::run(&contents).unwrap();
|
||||
|
||||
let options = Options::with_encoding(encoding_original);
|
||||
let buf = KbinXml::to_binary_with_options(options, &element).map_err(display_err)?;
|
||||
|
||||
Reference in New Issue
Block a user