Element returns an etree.Element representing the object in XML form.
()
| 1284 | |
| 1285 | // Element returns an etree.Element representing the object in XML form. |
| 1286 | func (a *Subject) Element() *etree.Element { |
| 1287 | el := etree.NewElement("saml:Subject") |
| 1288 | if a.BaseID != nil { |
| 1289 | el.AddChild(a.BaseID.Copy()) |
| 1290 | } |
| 1291 | if a.NameID != nil { |
| 1292 | el.AddChild(a.NameID.Element()) |
| 1293 | } |
| 1294 | if a.EncryptedID != nil { |
| 1295 | el.AddChild(a.EncryptedID.Copy()) |
| 1296 | } |
| 1297 | for _, v := range a.SubjectConfirmations { |
| 1298 | el.AddChild(v.Element()) |
| 1299 | } |
| 1300 | return el |
| 1301 | } |
| 1302 | |
| 1303 | // MarshalXML implements xml.Marshaler |
| 1304 | func (a Subject) MarshalXML(e *xml.Encoder, _ xml.StartElement) error { |