I have this XML
<?xml version="1.0" encoding="UTF-8" ?>
<uclassify xmlns="http://api.uclassify.com/1/ResponseSchema" version="1.01">
<status success="true" statusCode="2000"/>
<readCalls>
<classify id="cls1">
<classification textCoverage="1">
<class className="female" p="0.932408"/>
<class className="male" p="0.0675915"/>
</classification>
</classify>
</readCalls>
</uclassify>
or similar. What matters is, I don't have
<tag>value</tag>
but
<tag attribute1 attribute2 ... />.
What I want to output is for instance
attribute1: attributevalue1
So I want to enter a term like "female" and I want it to output 0.932408.
What I tried to get started
string xml = HttpGet("http://uclassify.com/browse/" + username + "/" + classifiername + "/" + operation + "?" + paramz.ToString());
XDocument doc = XDocument.Parse(xml);
var list = doc.Root.Elements("uclassify")
.Select(element => element.Value)
.ToList();
But list is always empty, which is presumably because there are no values, only attributes.
EDIT:
current version
string xml = HttpGet("http://uclassify.com/browse/" + username + "/" + classifiername + "/" + operation + "?" + paramz.ToString());
XDocument doc = XDocument.Parse(xml);
XNamespace ns = "http://api.uclassify.com/1/ResponseSchema";
var list = doc.Root.Descendants(ns + "class")
.Select(element => element.Value)
.ToList();
textBox1.Text = string.Join(",", list.ToArray());
Result is a comma.