XML deserialization problem (attribute with a namespace)
- by Johnny
hi,
I'm trying to deserialize the following XML node (RDF actually) into a class.
<rdf:Description rdf:about="http://d.opencalais.com/genericHasher-1/dae360d4-25f1-34a7-9c70-d5f7e4cfe175">
<rdf:type rdf:resource="http://s.opencalais.com/1/type/em/e/Country"/>
<c:name>Egypt</c:name>
</rdf:Description>
[Serializable]
[XmlRoot(Namespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#", ElementName = "Description")]
public class BasicEntity
{
[XmlElement(Namespace = "http://s.opencalais.com/1/pred/", ElementName = "name")]
public string Name { get; set; }
[XmlAttribute("about", Namespace = "http://www.w3.org/1999/02/22-rdf-syntax-ns#")]
public string Uri { get; set; }
}
The name element is parsed correctly but the about attribute isn't. What am I doing wrong?