pub fn add_attribute<W: Write>(attr: &AssertionAttribute, writer: &mut EventWriter<W>) {
    write_event(
        XmlEvent::start_element(("saml", "Attribute"))
            .attr("Name", attr.name.as_str())
            .attr("NameFormat", attr.nameformat.as_str())
            .into(),
        writer,
    );
    for value in &attr.values {
        write_event(
            XmlEvent::start_element(("saml", "AttributeValue"))
                .attr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance") // TODO: moved 2021-08-26 to make c14n work, is this valid, or is it going to bite me
                .attr("xsi:type", "xs:string")
                .into(),
            writer,
        );
        write_event(XmlEvent::characters(value), writer);
        write_event(XmlEvent::end_element().into(), writer);
    }
    // write_event(XmlEvent::end_element().into(), writer);
    write_event(XmlEvent::end_element().into(), writer);
}
/// add an attribute to the statement
add an attribute to the statement
add an attribute to the statement
pub fn add_attribute<W: Write>(attr: &AssertionAttribute, writer: &mut EventWriter<W>) {
    write_event(
        XmlEvent::start_element(("saml", "Attribute"))
            .attr("Name", attr.name.as_str())
            .attr("NameFormat", attr.nameformat.as_str())
            .into(),
        writer,
    );
    for value in &attr.values {
        write_event(
            XmlEvent::start_element(("saml", "AttributeValue"))
                .attr("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance") // TODO: moved 2021-08-26 to make c14n work, is this valid, or is it going to bite me
                .attr("xsi:type", "xs:string")
                .into(),
            writer,
        );
        write_event(XmlEvent::characters(value), writer);
        write_event(XmlEvent::end_element().into(), writer);
    }
    // write_event(XmlEvent::end_element().into(), writer);
    write_event(XmlEvent::end_element().into(), writer);
}
pub fn add_attribute < W : Write > ( attr : & AssertionAttribute , writer : & mut EventWriter < W > ) { write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . attr ( " " , attr . name . as_str ( ) ) . attr ( " " , attr . nameformat . as_str ( ) ) . into ( ) , writer , ) ; for value in & attr . values { write_event ( XmlEvent :: start_element ( ( " " , " " ) ) . attr ( " " , " " ) // TODO: moved 2021-08-26 to make c14n work, is this valid, or is it going to bite me . attr ( " " , " " ) . into ( ) , writer , ) ; write_event ( XmlEvent :: characters ( value ) , writer ) ; write_event ( XmlEvent :: end_element ( ) . into ( ) , writer ) ; } // write_event(XmlEvent::end_element().into(), writer); write_event ( XmlEvent :: end_element ( ) . into ( ) , writer ) ; }
add an attribute to the statement
add an attribute to the statement
attr
&AssertionAttribute
writer
&mut EventWriter<W>
attr
&AssertionAttribute
writer
&mut EventWriter<W>