The DOMXML library of functions is a comprehensive suite used to parse and operate with XML files.
In the previous DOMXML tests the domxml_open_file function has only
been used to read an xml file into memory, domxml_open_file ("notwellformed.xml"), for example. The function can also accept two additional optional parameters; mode & error.
The default mode is DOMXML_LOAD_PARSING, which must be specified if we want to use the error parameter; domxml_open_file("notwellformed.xml",DOMXML_LOAD_PARSING,$error).
This test uses a simple script to test the optional error parameter of the domxml_open_file function, 'domxml_open_file()'.
This test reads the file 'notwellformed.xml'
into memory and recognizes that the <p> tag is closed with a </a> tag. The test is successful if the error is displayed.