added xml-loader

This commit is contained in:
2024-05-19 12:47:52 +02:00
parent 44442b8c2a
commit 1af6d4d23c
6 changed files with 288 additions and 9 deletions

View File

@@ -1,13 +1,10 @@
#import "config.typ" as conf
#import "renderer.typ"
#import "structure.typ"
#import "xml-loader.typ"
#let valid-extensions = ("yaml", "json", "xml")
#let parse-xml(path) = {
panic("TODO")
}
#let parse-file(path) = {
let ext = path.split(".").last()
@@ -22,7 +19,7 @@
} else if ext == "json" {
return json(path)
} else if ext == "xml" {
return parse-xml(path)
return xml-loader.load(path)
}
}