Read simple XML in
This commit is contained in:
parent
6d8e99841e
commit
5a8c7fb56c
|
@ -0,0 +1,13 @@
|
|||
<ISO_Project>
|
||||
<Description>
|
||||
<Publisher>Jaby Wuff</Publisher>
|
||||
<License>C:/../</License>
|
||||
</Description>
|
||||
<Track type="data">
|
||||
<File name="Miau.png">C:/../</File>
|
||||
<Audiofile>C:/../</Audiofile>
|
||||
<Directory name="Wuff">
|
||||
<File name="Miau.png" type="file">C:/../</File>
|
||||
</Directory>
|
||||
</Track>
|
||||
</ISO_Project>
|
|
@ -0,0 +1,5 @@
|
|||
mod xml;
|
||||
|
||||
pub fn parse_xml(xml: String) {
|
||||
println!("Wuff: {}", xml);
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
pub mod config_reader;
|
||||
pub mod encoder;
|
||||
pub mod file_writer;
|
||||
pub mod types;
|
|
@ -1,4 +1,4 @@
|
|||
use psxcdgen_ex::{encoder::psx::{calculate_psx_lbas, encode_psx_image}, file_writer::{ImageType, write_image}, types::{layout::Layout, CDDesc, File, Directory}};
|
||||
use psxcdgen_ex::{encoder::psx::{calculate_psx_lbas, encode_psx_image}, file_writer::{ImageType, write_image}, types::{layout::Layout, CDDesc, File, Directory}, config_reader};
|
||||
use std::{path::PathBuf, str::FromStr};
|
||||
use tool_helper::Error;
|
||||
|
||||
|
@ -58,9 +58,14 @@ fn run_main() -> Result<(), Error> {
|
|||
write_image(desc, encode_psx_image, ImageType::BinCue, PathBuf::from_str("planschi.bin")?)
|
||||
}
|
||||
|
||||
fn run_main_xml() -> Result<(), Error> {
|
||||
config_reader::parse_xml(std::fs::read_to_string("../Tests/ISO_Planschbecken.xml")?);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn main() {
|
||||
match run_main() {
|
||||
Ok(_) => println!("\n<== Planschbecken ==>"),
|
||||
match run_main_xml() {
|
||||
Ok(_) => println!("\n<== Planschbecken End ==>"),
|
||||
Err(error) => println!("{}", error)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue