push adds parent elements to the stack and writes open tags.
(parents []string)
| 1091 | |
| 1092 | // push adds parent elements to the stack and writes open tags. |
| 1093 | func (s *parentStack) push(parents []string) error { |
| 1094 | for i := 0; i < len(parents); i++ { |
| 1095 | if err := s.p.writeStart(&StartElement{Name: Name{Local: parents[i]}}); err != nil { |
| 1096 | return err |
| 1097 | } |
| 1098 | } |
| 1099 | s.stack = append(s.stack, parents...) |
| 1100 | return nil |
| 1101 | } |
| 1102 | |
| 1103 | // UnsupportedTypeError is returned when Marshal encounters a type |
| 1104 | // that cannot be converted into XML. |
no test coverage detected