Lists Web サービスを介して調査情報にアクセスし、調査に含まれる質問を表示したいと考えています。
結果には多数のFieldノードが含まれており、そのうちのいくつかは調査の質問です。他のフィールドには、作成者、最終更新日などの情報が含まれています。
質問の選び方は?質問以外はすべて非表示になると思っていましたが、そうではありません。
これが現時点での私のコードです。約 16 項目を返します。アンケートには6つの質問があります...
// read question definitions
string[] HandleTypes = new string[] { "Number", "DateTime", "Text", "Choice", "GridChoice", "Boolean" };
var query = from n in node.Descendants(ns+"Field")
where (n.Attribute("Hidden") == null || n.Attribute("Hidden").Value.ToLower() == "true")
&& (n.Attribute("Type") != null && HandleTypes.Contains(n.Attribute("Type").Value))
select new Question(n.Attribute("ID").Value)
{
Text = n.Attribute("DisplayName").Value,
QuestionType = n.Attribute("Type").Value,
Element = n
};
アイデアはありますか?