KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to get my httphandler to print out an XML file with the format: <ScheduledShows> <ScheduledShowElement>...</ScheduledShowElement> <ScheduledShowElement>...</ScheduledShowElement> <ScheduledShowElement>...</ScheduledShowElement> </ScheduledShows> But for some reason, the attribute XmlRoot("ScheduledShowElement") in ScheduledShow.cs is not working the way i want it to work. Instead, the output i get is: <ScheduledShows> <ScheduledShow>...<ScheduledShow> <ScheduledShow>...<ScheduledShow> <ScheduledShow>...<ScheduledShow </ScheduledShows> Basically, the name of the node is not being overriden to . How do i get my xml serializer to label nodes as ? Below is my code and xml output. Thanks! 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) { int offsetInDays, timezone, size; DateTime selectedDateTime; Int32.TryParse(context.Request.QueryString["timezone"], out timezone); Int32.TryParse(context.Request.QueryString["daysToOffset"], out offsetInDays); if (!String.IsNullOrEmpty(context.Request.QueryString["size"])) { Int32.TryParse(context.Request.QueryString["size"], out size); } else { size = NoLimitOnSize; } if (timezone &
Tags (comma-separated)
Save Edits
Cancel