Added List.TagType method to get list inner tag type.
Added check for End tag type in List.WriteTo to skip writing tags.