When using XMLValidator.validate you must use strict equality check to confirm if the XML is valid or not.
Example: XMLValidator.validate(<some_xml>) === true
If some xml is invalid and without the use of a strict equality check the result is always true
Example: XMLValidator.validate(<some_invalid_xml>) returns an error object meaning a non-strict check will always equate to true
A cleaner more readable usage would be to return an object with an isValid member that is either true or false.
When using
XMLValidator.validateyou must use strict equality check to confirm if the XML is valid or not.Example:
XMLValidator.validate(<some_xml>) === trueIf some xml is invalid and without the use of a strict equality check the result is always true
Example:
XMLValidator.validate(<some_invalid_xml>)returns an error object meaning a non-strict check will always equate to trueA cleaner more readable usage would be to return an object with an
isValidmember that is either true or false.