This commit is contained in:
sherlockforrest
2023-06-20 09:22:53 +08:00
commit bf2ed2e31f
621 changed files with 271599 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
namespace XmlParserByAttribute
{
[XmlRoot("cats")]
public class CatCollection
{
[XmlElement("cat")]
public List<Cat> Cats { get; set; } = new List<Cat>();
}
[XmlRoot("cat")]
public class Cat
{
[XmlAttribute("color")]
public string Color { get; set; }
[XmlElement("saying")]
public string Saying { get; set; }
[XmlAttribute("animType")]
public AnimationType animationType;
}
public enum AnimationType
{
Wrap,
Loop
}
}