modification to handle self closing empty or void tags