()
| 100 | } |
| 101 | |
| 102 | func (c *xmlStartElement) encode() []byte { |
| 103 | return encodeChunk(resXMLStartElementType, func(w binary.Writer) { |
| 104 | w.Uint32(c.lineNumber) |
| 105 | c.comment.encode(w) |
| 106 | }, func(w binary.Writer) { |
| 107 | c.namespace.encode(w) |
| 108 | c.name.encode(w) |
| 109 | w.Uint16(20) // attributeStart |
| 110 | w.Uint16(xmlAttributeSize) // attributeSize |
| 111 | w.Uint16(uint16(len(c.attributes))) // attributeCount |
| 112 | w.Uint16(0) // id_index |
| 113 | w.Uint16(0) // class_index |
| 114 | w.Uint16(0) // style_index |
| 115 | for _, at := range c.attributes { |
| 116 | at.encode(w) |
| 117 | } |
| 118 | }) |
| 119 | } |
| 120 | |
| 121 | func (c *xmlStartElement) addAttribute(attr *xmlAttribute) { |
| 122 | c.attributes = append(c.attributes, *attr) |
nothing calls this directly
no test coverage detected