我想yt:username
从此XML中提取字段:
var xDoc = XDocument.Load(requestedURL);
var m_oListaMeteo = xDoc.Descendants(ns + "entry").Select(n =>
{
return new
{
username = n.Element(ns + "yt:username").Value
};
});
但XDocument
它本身说The ':' character, hexadecimal value 0x3A, cannot be included in a name.
需要字符串替换吗?还是需要我管理 youtube 的命名空间?