mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-26 19:38:14 +08:00
Merge 2ae5988db30756a7cf256d35019dc5151806387f into e88fc8927a52b74f55bec0351604a56ac0aa1c51
This commit is contained in:
commit
d1fa5ad888
@ -27,8 +27,13 @@ func (xmlBinding) BindBody(body []byte, obj any) error {
|
||||
|
||||
func decodeXML(r io.Reader, obj any) error {
|
||||
decoder := xml.NewDecoder(r)
|
||||
if err := decoder.Decode(obj); err != nil {
|
||||
return err
|
||||
for {
|
||||
if err := decoder.Decode(obj); err != nil {
|
||||
if err == io.EOF{
|
||||
break
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
return validate(obj)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user