XPATHでxmlファイルを解析しています
nodes = navigator.Select("/bk:ChaosPlan/bk:SubscriptionInfo",manager);
while (nodes.MoveNext())
{
XPathNavigator childNodes = nodes.Current.Clone();
childNodes.MoveToFirstAttribute();
string name = childNodes.Value;
bool x = true;
x= childNodes.MoveToFirstChild();
string Id = childNodes.Value;
subNamenAndId.Add(new Result(name, Id));
childNodes.MoveToNext();
certName = childNodes.Value;
childNodes.MoveToNext();
templateName = childNodes.Value;
}
しかし、最初の子に移動すると(bool x= true;行の後)、falseが返され、最初の子に移動しません。
私がする必要があるのは、クエリを実行した後に最初の要素の属性を取得し、この要素の最初の 3 つの子を反復処理してそれらの値を保存することです。