Код: Выделить всё
< /code>
Вот код: < /p>
auto nss = winrt::box_value(L"xmlns:sv='https://thing'");
auto ns = winrt::box_value(L"https://thing");
for (Windows::Data::Xml::Dom::IXmlNode node : document.SelectNodesNS(L"/sv:Things/sv:Foos/sv:Bars/sv:Bar", nss)) {
auto attrs = node.Attributes();
auto titleNode = attrs.GetNamedItemNS(ns, L"title");
if (!titleNode) {
// titleNode is NULL - why?
continue;
}
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... n-the-valu
Мобильная версия