NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.49k stars 302 forks source link

Fixed wrong example code for using the validator #518

Closed patrickl92 closed 1 year ago

patrickl92 commented 1 year ago

Purpose / Goal

Fixes an error in the example code, where the boolean parameter to enable validation needs to be specified on the parse function, not on the constructor of the XMLParser. I also moved the constructor out of the try/catch block, to easier indicate where the error will be thrown.

Type

coveralls commented 1 year ago

Coverage Status

Coverage remained the same at 98.447% when pulling 3c9eaaf07070e4771306ca720893df8647d81e42 on patrickl92:master into f900ef83a62e08089489c5bd17d90b677f3f3a6f on NaturalIntelligence:master.