highsource / jsonix

Powerful XML<->JSON JavaScript mapping library.
BSD 2-Clause "Simplified" License
359 stars 78 forks source link

How to get errors? #240

Open GFdevelop opened 4 years ago

GFdevelop commented 4 years ago

How can I get errors when elements are not valid? ex:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MYTAG>
  <One Id="one">
    <Valid1>
    </Valid1>
    <Valid2>
    </Valid2>
    <Invalid3>
    </Invalid3>
  </One>
</MYTAG>

jsonix ignore Invalid3 but I need to known that xml is invalid. With ajv I have validate(unmarshalled) always true because Invalid3 is not in the object...how todo?