mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +08:00
[ocaml] parse XML file with ExtXml version (#3023)
it provides better messages in case of XML or DTD errors
This commit is contained in:
committed by
GitHub
parent
07a43ca4c4
commit
e5af06a001
@@ -135,7 +135,7 @@ let from_xml = function
|
||||
| _ -> failwith "Airframe.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let af = from_xml (Xml.parse_file filename) in
|
||||
let af = from_xml (ExtXml.parse_file filename) in
|
||||
{ af with filename }
|
||||
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ let from_xml = function
|
||||
| _ -> failwith "Autopilot.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let ap = from_xml (Xml.parse_file filename) in
|
||||
let ap = from_xml (ExtXml.parse_file filename) in
|
||||
{ ap with filename }
|
||||
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ let from_xml = function
|
||||
| _ -> failwith "Flight_plan.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let fp = from_xml (Xml.parse_file filename) in
|
||||
let fp = from_xml (ExtXml.parse_file filename) in
|
||||
{ fp with filename }
|
||||
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ let from_xml = fun xml ->
|
||||
makefiles = List.rev m.makefiles
|
||||
}
|
||||
|
||||
let from_file = fun filename -> from_xml (Xml.parse_file filename)
|
||||
let from_file = fun filename -> from_xml (ExtXml.parse_file filename)
|
||||
|
||||
(** search and parse a module xml file and return a Module.t *)
|
||||
(* FIXME search folder path: <PPRZ_PATH>/*/<module_name[_type]>.xml *)
|
||||
|
||||
@@ -84,5 +84,5 @@ let from_xml = function
|
||||
| _ -> failwith "Radio.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let r = from_xml (Xml.parse_file filename) in
|
||||
let r = from_xml (ExtXml.parse_file filename) in
|
||||
{ r with filename }
|
||||
|
||||
@@ -98,7 +98,7 @@ let from_xml = function
|
||||
| _ -> failwith "Settings.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let s = from_xml (Xml.parse_file filename) in
|
||||
let s = from_xml (ExtXml.parse_file filename) in
|
||||
{ s with filename }
|
||||
|
||||
(**
|
||||
|
||||
@@ -102,7 +102,7 @@ let from_xml = function
|
||||
| _ -> failwith "Telemetry.from_xml: unreachable"
|
||||
|
||||
let from_file = fun filename ->
|
||||
let t = from_xml (Xml.parse_file filename) in
|
||||
let t = from_xml (ExtXml.parse_file filename) in
|
||||
{ t with filename }
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user