new: just parse with roxmltree

This commit is contained in:
Wataru Otsubo 2025-01-29 17:12:15 +09:00
parent 637e96b7c5
commit f64c225ea0
4 changed files with 31 additions and 0 deletions

1
src/lib.rs Normal file
View file

@ -0,0 +1 @@

View file

@ -1,3 +1,16 @@
use std::fs;
fn main() {
println!("Hello, world!");
let xmlfile = fs::read_to_string("./csr.xml").unwrap();
let doc = roxmltree::Document::parse_with_options(
&xmlfile,
roxmltree::ParsingOptions {
allow_dtd: true,
nodes_limit: u32::MAX,
},
)
.unwrap();
println!("Parsed: {:#?}", doc);
println!("Root: {:?}", doc.root_element());
}