nerdexam
Microsoft

98-372 · Question #187

You load an XML document named doc1 that has an attribute named EmployeeId. Which code fragment will set the value of EmployeeId to A23?

The correct answer is A. Doc1.DocumentEIement.SetAttribute("EmployeeId","A23"). See the full explanation below for the reasoning.

Question

You load an XML document named doc1 that has an attribute named EmployeeId. Which code fragment will set the value of EmployeeId to A23?

Options

  • ADoc1.DocumentEIement.SetAttribute("EmployeeId","A23")
  • BDoc1.CreateElement ("EmployeeId", "A23")
  • CDoc1.CreateNode("EmployeeId", "A23", "")
  • DDoc1.CreateActribute("EmpIoyeeId", "A23")

How the community answered

(26 responses)
  • A
    69% (18)
  • B
    12% (3)
  • C
    15% (4)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 98-372 Practice