m 试图从 Xml 下面检索挑战元素,
我,我使用下面的代码
string Xmlstring = "<?xml version=\"1.0\"?><stream:stream id=\"3DAC47EA\" from=\"chat.facebook.com\" xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" version=\"1.0\" xml:lang=\"en\"><stream:features><mechanisms xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"><mechanism>X-FACEBOOK-PLATFORM</mechanism><mechanism>DIGEST-MD5</mechanism></mechanisms></stream:features><challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">dmVyc2lvbj0xJm1ldGhvZD1hdXRoLnhtcHBfbG9naW4mbm9uY2U9QjNBOUU4NzJFQUJGNkQ5RDM0RTZDNjgzMjkyMTBGOEQ=</challenge>";
XmlDocument Doc = new XmlDocument();
Doc.LoadXml(Xmlstring);
我收到错误消息“出现意外的文件结尾。以下元素未关闭:流:流。第 1 行,位置 510。”