How To Add “:” (namespace prefix) in XAttribute Name in Xml
问题 i have one xml file and using in silverlight. doc.Descendants(xamlparent).FirstOrDefault().Add(new XAttribute("x:Class","WorkflowConsoleApplication1.modify")); but in this ":" hexadecimal cause error.how can i add this hexadecimal in attribute name.is this possible ?. 回答1: You have to see the URI of the namespace which is mapped to the x namespace prefix. Check out the top of your XML document, it will contain something like xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" . Then, you