allow encoding of empty tags for XML and JSON
update test cases
update test cases
update test cases
update test cases
update test cases