sync with latest tyxml

wip2

wip3

wip4

wip5

wip6

wip7

wip8

wip9