The DOMXML library of functions is a comprehensive suite used to parse and operate with XML files. However, it can also be used to work with HTML files.
This test uses
a simple script which tests the html_doc_file function, 'html_doc_file()', the get_elements_by_tagname function, 'get_elements_by_tagname()', the append_child function,
'append_child()', the create_text_node function, 'create_text_node()', and the dump_mem function, 'dump_mem()'. The script parses the HTML document 'html4.html', appends new text
to one of the elements, and then prints the contents.
The test is successful if a heading of 'Hello World - and more' is displayed, followed by 'This is a hello world test,
with a picture!' on the next line, and below that there is an image which again says, 'Hello World!'.