How to add xmlnamespace to a xmldocument

前端 未结 3 976
终归单人心
终归单人心 2020-12-03 21:47

Im trying to create a xml the should look like this




        
3条回答
  •  青春惊慌失措
    2020-12-03 22:07

    This question also shows another way of doing this: Creating a specific XML document using namespaces in C#

    You could alternatively use the XmlNamespaceManager class

    http://msdn.microsoft.com/en-us/library/d6730bwt%28VS.80%29.aspx

    Finally there is always Linq too, you could use a XDocument and XNamespace

    http://msdn.microsoft.com/en-us/library/bb387075.aspx

提交回复
热议问题