kartal
kartal

Reputation: 18096

Add attributes to IXmlNode

In windows app store they changed the XmlNode to IXmlNode !!! , I tried to add attribute to the node by the normal way but I failed they removed Attributes.Append(---).

Is there any solution to append attributes to the node ?

 XmlDocument tileData = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquarePeekImageAndText01);
            IXmlNode bindingnode = tileData.SelectSingleNode("binding");
            XmlAttribute newAttribute = tileData.CreateAttribute("branding");
            newAttribute.Value = "name";

Upvotes: 1

Views: 781

Answers (1)

kartal
kartal

Reputation: 18096

I tried and I found the solution is

bindingnode.Attributes.SetNamedItem(newAttribute);

Upvotes: 2

Related Questions