peanuts/src/main.rs

21 lines
517 B
Rust

use peanuts::xml::composers::Composer;
use peanuts::xml::parsers::Parser;
use peanuts::xml::Document;
#[tokio::main]
async fn main() {
let (rest, document) = Document::parse(
"<?xml version=\"1.0\"?>
<TEST>
<block1>Background Mark 1</block1>
<block2>Background Mark 2</block2>
<block3>Background Mark 3</block3>
</TEST>ahsdkjlfhasdlkjfhkljh
",
)
.unwrap();
println!("{:#?}{}", document, rest);
let mut stdout = tokio::io::stdout();
document.write(&mut stdout).await.unwrap();
}