Get xml valid/unvalid status

Hi all,
I set up a web interface with CM to edit some XML files, that’s great, it highlights all the elements in green if the XML is at least well formed, if not I can see red highlited tags.

Now: how can I get this status value (valid/not valid) in a variable to enable or disable the Save button of my editor?

Thanks
Alfredo

The XML mode isn’t a real validator—it doesn’t catch all forms of invalid XML and doesn’t track validity like that. You’ll want to look for a separate tool to do validation.

I know, but a first step of validation based on parsing a well-formed/not-well-formed portion of XML fits my needs for now.

A real validation will be implemented later using the functions of the framework we’re working on (ie. exist-db).

Thanks,
Alfredo