引用未声明的实体';middot';
本文关键字:middot 实体 未声明 引用 | 更新日期: 2023-09-27 17:59:06
我正在使用C#中的GitHub REST API。代码运行良好,几天后,今天,我出现了这个错误。知道我从哪里开始吗?
Exception caught: System.ApplicationException: Error retrieving response. Check
inner details for more info. ---> System.Xml.XmlException: Reference to undeclared entity 'middot'. Line 7, position 28.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.HandleGeneralEntityReference(String name, Boolean isInAttributeValue, Boolean pushFakeEntityIfNullResolver, Int32 entityStartLinePos)
at System.Xml.XmlTextReaderImpl.HandleEntityReference(Boolean isInAttributeValue, EntityExpandType expandType, Int32& charRefEndPos)
at System.Xml.XmlTextReaderImpl.ParseText(Int32& startPos, Int32& endPos, Int32& outOrChars)
at System.Xml.XmlTextReaderImpl.FinishPartialValue()
at System.Xml.XmlTextReaderImpl.get_Value()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at RestSharp.Deserializers.XmlDeserializer.Deserialize[T](IRestResponse response)
at RestSharp.RestClient.Deserialize[T](IRestRequest request, IRestResponse raw)
--- End of inner exception stack trace ---
at DevOps.RestSharpAPI.Execute[T](RestClient client, RestRequest request) in
C:'2015'C#'DevOps'RESTLibrary'RestSharpAPI.cs:line 75
at DevOps.GitHubAPI.GetGitHubUser() in C:'2015'C#'DevOps'GitHub'GitHubAPI.cs:line 44
at DevOps.GitHubAPI.Main(String[] args) in C:'2015'C#'DevOps'GitHub'GitHubAPI.cs:line 169
只是想让你们知道,我不小心更改了这个:
static string baseUrl = "http://github.mycompany.com/api/v3";
至
static string baseUrl = "http://github.com/api/v3";
一旦我把它改回来,错误就消失了。很难弄清楚。