Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created July 9, 2015 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/54ae9b4024e8c1b74cff to your computer and use it in GitHub Desktop.
Save angelovstanton/54ae9b4024e8c1b74cff to your computer and use it in GitHub Desktop.
[XmlRoot(ElementName = "sites")]
public class Sites
{
[XmlElement(ElementName = "site")]
public List<Site> Site { get; set; }
}
[XmlRoot(ElementName = "site")]
public class Site
{
[XmlElement(ElementName = "redirects")]
public Redirects Redirects { get; set; }
[XmlAttribute(AttributeName = "url")]
public string Url { get; set; }
[XmlAttribute(AttributeName = "name")]
public string Name { get; set; }
}
[XmlRoot(ElementName = "redirects")]
public class Redirects
{
[XmlElement(ElementName = "redirect")]
public List<Redirect> Redirect { get; set; }
}
[XmlRoot(ElementName = "redirect")]
public class Redirect
{
[XmlAttribute(AttributeName = "from")]
public string From { get; set; }
[XmlAttribute(AttributeName = "to")]
public string To { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment