I'm working with nodejs and I need to validate if an xml is well formed, just that.
I do not want to use xsd because the xml nodes can change.. and I do not know how to use it only to validate syntax.
XML valid
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
XML invalid
<?xml version="1.0" encoding="UTF-8"?>
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Remi
I just need to validate that the xml syntax is correct and get true if it is well formed or false if not.
Can anybody help me?