I’m trying to add the following attributes (xmlns:xsi and xsi:type) to a node
(Grantee) like the following:
<Grantee xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:type="Group ">
<URI>http://acs.amazonaws.c om/groups/s3/LogDelivery</URI>
</Grantee>
However I am unclear on how to add these types of attributes. The following
doesn't seem to work.
Scott
XmlNode attribute;
attribute = doc.CreateNode( XmlNodeType.Att ribute, "xsi:type", "");
attribute.Value = "Group";
grantee.Attribu tes.SetNamedIte m(attribute);
attribute = doc.CreateNode( XmlNodeType.Att ribute, "xmlns:xsi" , "");
attribute.Value = "http://www.w3.org/2001/XMLSchema-instance";
grantee.Attribu tes.SetNamedIte m(attribute);
(Grantee) like the following:
<Grantee xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xsi:type="Group ">
<URI>http://acs.amazonaws.c om/groups/s3/LogDelivery</URI>
</Grantee>
However I am unclear on how to add these types of attributes. The following
doesn't seem to work.
Scott
XmlNode attribute;
attribute = doc.CreateNode( XmlNodeType.Att ribute, "xsi:type", "");
attribute.Value = "Group";
grantee.Attribu tes.SetNamedIte m(attribute);
attribute = doc.CreateNode( XmlNodeType.Att ribute, "xmlns:xsi" , "");
attribute.Value = "http://www.w3.org/2001/XMLSchema-instance";
grantee.Attribu tes.SetNamedIte m(attribute);
Comment