我的问题非常像one。但是,我需要在同一个根目录中允许两个不同的命名空间。
类似的东西:
[XmlType(Namespace = "")]
[XmlRoot("included_parameters", Namespace = "http://apif.freescale.net/schemas/paramdef/1.0")]
[XmlRoot("included_parameters", Namespace = "http://apif.freescale.net/schemas/paramdef/1.1")]
public class IncludedParameters
{
}
基本上,我想将模式的1.1版架构的xml文件反序列化为相同的.net类。
如果您需要更多详细信息,请与我们联系。
克里斯
答案 0 :(得分:0)
有一个SerializationBinder
类让一个人进行这种类型的转换操作。
"Some users need to control which class to load, either because the class has moved between assemblies or a different version of the class is required on the server and client"