Skip to content

Commit

Permalink
[ocaml] parse XML file with ExtXml version (#3023)
Browse files Browse the repository at this point in the history
it provides better messages in case of XML or DTD errors
  • Loading branch information
gautierhattenberger committed Apr 9, 2023
1 parent 07a43ca commit e5af06a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sw/lib/ocaml/airframe.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }


Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/autopilot.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }


Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/flight_plan.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }


Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/module.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 *)
Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/radio.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
2 changes: 1 addition & 1 deletion sw/lib/ocaml/settings.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

(**
Expand Down
2 changes: 1 addition & 1 deletion sw/lib/ocaml/telemetry.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }


Expand Down

0 comments on commit e5af06a

Please sign in to comment.