Yes, it seems possible. Check out XML Validator at w3schools.com .
The ValidateXML function at the beginning of the page source will do what you want.
The input to the function is an XML file with an associated or embedded DTD, for example:
<?xml version="1.0" ?> <!DOCTYPE note [ <!ELEMENT note (to,from,heading,body)> <!ELEMENT to (#PCDATA)> <!ELEMENT from (#PCDATA)> <!ELEMENT heading (#PCDATA)> <!ELEMENT body (#PCDATA)> ]> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <message>Don't forget me this weekend!</message> </note>
Please note, however, that w3schools.com has the following text on the About Copyright page, so you will probably need to use this function to write your own version.
Pages, code or other content from W3Schools may not be redistributed or reproduced in any way, form or form without the written permission of Refsnes data.
user742071
source share