Added switch statement for void elements

Hiya, 

This should hopefully prevent these types of tags from accidentally getting closing tags generated for them. I think something similar might be needed in class-element.php on the __toString() method, but I haven't checked that out yet :)