(s string)
| 102 | } |
| 103 | |
| 104 | func escape(s string) string { |
| 105 | for i := 0; i < len(s); i++ { |
| 106 | switch s[i] { |
| 107 | case '"', '&', '\'', '<', '>': |
| 108 | b := bytes.NewBuffer(nil) |
| 109 | ixml.EscapeText(b, []byte(s)) |
| 110 | return b.String() |
| 111 | } |
| 112 | } |
| 113 | return s |
| 114 | } |
| 115 | |
| 116 | // Next returns the next token, if any, in the XML stream of d. |
| 117 | // RFC 4918 requires to ignore comments, processing instructions |