单项选择题你正在创建一个生成 XML 文档的 ASP.NET Web 应用。你需要为文档增加一个 XML 声明。下面那个代码能够生成如下的 XML 声明?()
A.XmlDocument doc = new XmlDocument();doc.Load("subscribers.xml");XmlDeclaration xmldecl = doc.CreateXmlDeclaration("encoding", "Unicode");
B.XmlDocument doc = new XmlDocument();doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", null, "yes");
C.XmlDocument doc = new XmlDocument(); doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", "Unicode", "yes");
D.XmlDocument doc = new XmlDocument(); doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", "Unicode");