mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-09 22:18:48 +08:00
Merge 2ae5988db30756a7cf256d35019dc5151806387f into 5260de6a83283abb87e827130accd495ad543cf3
This commit is contained in:
commit
a7b34b80a7
@ -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