欢迎来到易学考试网 易学考试官网
全部科目 > 微软认证考试 > MCTS > MCTS(70-528)

多项选择题

You load an XmlDocument named doc with the following XML. Dictionary World Atlas You need to change the value for the genre attribute to NA for all book attributes. First, you add the following code segment to your class. XmlElement root = doc.DocumentElement; XmlNodelist nodes = root.SelectNodes(“books/book”); Which additional two code segments can you use to achieve this goal? ()

    A. foreach (XmlNode node in nodes){ node.Attributes[0].Value = “NA”;}
    B. foreach (XmlNode node in nodes){ node.Attributes[1].Value = “NA”;}
    C. foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“/genre”); genre.Value = “NA”;}
    D. foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“@genre”); genre.Value = “NA”;}
    E. foreach (XmlNode node in nodes){XmlNode genre = node.SelectSingleNode(“genre”); genre.Value = “NA”;}

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题