Simple dom parsing library and utility functions