MCPcopy Create free account
hub / github.com/crewjam/saml / Element

Method Element

schema.go:1286–1301  ·  view source on GitHub ↗

Element returns an etree.Element representing the object in XML form.

()

Source from the content-addressed store, hash-verified

1284
1285// Element returns an etree.Element representing the object in XML form.
1286func (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
1304func (a Subject) MarshalXML(e *xml.Encoder, _ xml.StartElement) error {

Callers 2

Calls 1

ElementMethod · 0.45

Tested by 2