我通常只使用JSON,所以如果这是一个很低的问题我会道歉。我正在从网页中提取xml数据,并且嵌入了一个SW版本,我需要知道是否应该更新。在JSON中我只是将字段的类型更改为Version并将字符串更改为可以处理的Version,我在xml构造函数中找不到类似的方法。
正在使用的代码是VS2015,它是将数据粘贴作为通用值生成的。
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = true)]
public partial class xml
{
private xmlSoftware softwareField;
/// <remarks/>
public xmlSoftware software
{
get
{
return this.softwareField;
}
set
{
this.softwareField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = false)]
public partial class xmlSoftware
{
private xmlSoftwareCheckforupdates checkforupdatesField;
/// <remarks/>
public xmlSoftwareCheckforupdates checkforupdates
{
get
{
return this.checkforupdatesField;
}
set
{
this.checkforupdatesField = value;
}
}
}
/// <remarks/>
[System.SerializableAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = false)]
public partial class xmlSoftwareCheckforupdates
{
private string latest_versionField;
//Other Stuff before and after this item
/// <remarks/>
public string latest_version
{
get
{
return this.latest_versionField;
}
set
{
this.latest_versionField = value;
}
}
}