Tag: xmlroot

用于Xml Serilization的XmlRoot()不起作用

我正在尝试让我的httphandler打印出格式为的XML文件: … … … 但由于某种原因,ScheduledShow.cs中的属性XmlRoot(“ScheduledShowElement”)不能按我希望的方式工作。 相反,我得到的输出是: … … …<ScheduledShow 基本上,节点的名称没有被覆盖。 如何让我的xml序列化程序将节点标记为? 下面是我的代码和xml输出。 谢谢! OneDayScheduleHandler.cs using System; using System.Collections.Generic; using System.Web; using System.Xml.Serialization; using Microsoft.Practices.EnterpriseLibrary.Data; using System.Data.Common; using System.Data; using System.IO; using System.Xml; using System.Text; using CommunityServer.Scheduler; namespace CommunityServer.Scheduler { public class OneDayScheduleHandler : IHttpHandler { private readonly int NoLimitOnSize = -1; public void ProcessRequest(HttpContext context) […]