mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-06-29 16:19:26 +09:00
new: just parse with roxmltree
This commit is contained in:
parent
637e96b7c5
commit
f64c225ea0
4 changed files with 31 additions and 0 deletions
1
src/lib.rs
Normal file
1
src/lib.rs
Normal file
|
@ -0,0 +1 @@
|
|||
|
13
src/main.rs
13
src/main.rs
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue