mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-02-24 01:27:08 +09:00
24 lines
641 B
Rust
24 lines
641 B
Rust
use std::fs;
|
|
|
|
use endcap_sl_register_interface_generator::types;
|
|
|
|
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());
|
|
{
|
|
let root = doc.root_element();
|
|
println!("tag: {:?}", root.tag_name());
|
|
}
|
|
|
|
let register_map = types::Module::from_xml_dom(doc.root_element()).unwrap();
|
|
}
|