Element returns an etree.Element representing the object in XML form.
()
| 494 | |
| 495 | // Element returns an etree.Element representing the object in XML form. |
| 496 | func (a *Scoping) Element() *etree.Element { |
| 497 | el := etree.NewElement("samlp:Scoping") |
| 498 | if a.ProxyCount != nil { |
| 499 | el.CreateAttr("ProxyCount", strconv.Itoa(*a.ProxyCount)) |
| 500 | } |
| 501 | if a.IDPList != nil { |
| 502 | el.AddChild(a.IDPList.Element()) |
| 503 | } |
| 504 | for _, requesterID := range a.RequesterIDs { |
| 505 | el.CreateElement("samlp:RequesterID").SetText(requesterID) |
| 506 | } |
| 507 | return el |
| 508 | } |
| 509 | |
| 510 | // IDPList represents the SAML object of the same name. |
| 511 | // |