I have this xml from our vendor (an excerpt):
<Roles xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:immutable="http://www.digitalmeasures.com/schema/immutable">
<immutable:Role roleKey="INDIVIDUAL-ACTIVITIES-University-DataBackupService" text="Data Backup Service">
<Item xlink:type="simple" xlink:href="/login/service/v4/Role/INDIVIDUAL-ACTIVITIES-University-DataBackupService"/>
<Users xlink:type="simple" xlink:href="/login/service/v4/RoleUser/INDIVIDUAL-ACTIVITIES-University-DataBackupService"/>
</immutable:Role>
<Role roleKey="INDIVIDUAL-ACTIVITIES-University-DepartmentUpdatePrimaryAssignmentOrg" text="Department: Update Primary Assignment Org">
<Item xlink:type="simple" xlink:href="/login/service/v4/Role/INDIVIDUAL-ACTIVITIES-University-DepartmentUpdatePrimaryAssignmentOrg"/>
<Users xlink:type="simple" xlink:href="/login/service/v4/RoleUser/INDIVIDUAL-ACTIVITIES-University-DepartmentUpdatePrimaryAssignmentOrg"/>
</Role>
</Roles>
I have these classes set up in my c# code:
public class Role
{
[XmlAttribute]
public string roleKey { get; set; }
[XmlAttribute]
public string text { get; set; }
[XmlAttribute]
public string Item { get; set; }
[XmlAttribute]
public string Users { get; set; }
}
//Class to hold our array of <DailyStat>
[Serializable]
[XmlRootAttribute("Roles")]
//[XmlRootAttribute("immutable:Roles")]
public class Roles
{
[XmlElement("Role")]
public Role[] thisRole { get; set; }
}
The xml I get from the vendor (via a web service), has 20 elements tagged Role and 6 tagged as immutable:Role. When I run my code, I only see the 20 Role items, but I want all 26 items. How can I go about getting them?