Element returns an etree.Element representing the object in XML form.
()
| 1236 | |
| 1237 | // Element returns an etree.Element representing the object in XML form. |
| 1238 | func (a *AttributeValue) Element() *etree.Element { |
| 1239 | el := etree.NewElement("saml:AttributeValue") |
| 1240 | el.CreateAttr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance") |
| 1241 | el.CreateAttr("xmlns:xs", "http://www.w3.org/2001/XMLSchema") |
| 1242 | el.CreateAttr("xsi:type", a.Type) |
| 1243 | if a.NameID != nil { |
| 1244 | el.AddChild(a.NameID.Element()) |
| 1245 | } |
| 1246 | el.SetText(a.Value) |
| 1247 | return el |
| 1248 | } |
| 1249 | |
| 1250 | // LogoutResponse represents the SAML object of the same name. |
| 1251 | // |