Element returns an etree.Element representing the object in XML form.
()
| 1405 | |
| 1406 | // Element returns an etree.Element representing the object in XML form. |
| 1407 | func (a *SubjectConfirmation) Element() *etree.Element { |
| 1408 | el := etree.NewElement("saml:SubjectConfirmation") |
| 1409 | el.CreateAttr("Method", a.Method) |
| 1410 | if a.NameID != nil { |
| 1411 | el.AddChild(a.NameID.Element()) |
| 1412 | } |
| 1413 | if a.EncryptedID != nil { |
| 1414 | el.AddChild(a.EncryptedID.Copy()) |
| 1415 | } |
| 1416 | if a.SubjectConfirmationData != nil { |
| 1417 | el.AddChild(a.SubjectConfirmationData.Element()) |
| 1418 | } |
| 1419 | return el |
| 1420 | } |
| 1421 | |
| 1422 | // MarshalXML implements xml.Marshaler |
| 1423 | func (a SubjectConfirmation) MarshalXML(e *xml.Encoder, start xml.StartElement) error { |