XML binds the body string into the struct. Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode).
(out any)
| 329 | // XML binds the body string into the struct. |
| 330 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
| 331 | func (b *Bind) XML(out any) error { |
| 332 | bind := binder.GetFromThePool[*binder.XMLBinding](&binder.XMLBinderPool) |
| 333 | bind.XMLDecoder = b.ctx.App().config.XMLDecoder |
| 334 | |
| 335 | defer releasePooledBinder(&binder.XMLBinderPool, bind) |
| 336 | |
| 337 | if err := b.returnBindErr(bind.Bind(b.ctx.Body(), out), BindSourceBody); err != nil { |
| 338 | return err |
| 339 | } |
| 340 | |
| 341 | return b.validateStruct(out) |
| 342 | } |
| 343 | |
| 344 | // Form binds the form into the struct, map[string]string and map[string][]string. |
| 345 | // Returns *BindError on parse failure (manual mode) or *Error with status 400 (auto-handling mode). |
no test coverage detected