Files
IntroToWebAuthoring/src/parser/mod.rs
T

21 lines
396 B
Rust
Raw Normal View History

2025-10-30 14:44:41 -06:00
use std::collections::HashMap;
use crate::views::View;
mod interpreter;
mod parser;
pub const TEST_XML: &'static str = include_str!("../../pages/main.xml");
#[derive(Debug)]
struct Tag {
name: String,
children: Vec<Tag>,
attributes: HashMap<String, String>,
}
pub fn parse(xml: &str) -> Box<dyn View> {
let tag = parser::parse_xml(xml);
interpreter::interpret_tag(tag)
}