HttpClient hpClient = new();
XmlDocument xmDoc = new();
XmlReader xmRead = XmlReader.Create(url);
// string response = await hpClient.GetStringAsync(url);
string nodeOuterText; // used later in the code
Point coords = new(10, 70);
lblMinorErrorReporter.Text = MinorErrorStrings[10];
xmRead.MoveToContent();
xmRead.Read();
xmDoc.Load(xmRead);
MessageBox.Show("Test");
I’ve put a VS breakpoint on xmRead.MoveToContent()
. when it hits, it’s expected this go to xmRead.Read()
, i.e. the next line, when “Continue” is hit in the debugger, but instead, the line is never hit (I’ve set up a breakpoint on that line, too, and that breakpoint is never hit). the program just acts as if that was the end of that function. the program doesn’t freeze, it still responds to button clicks, maximizing etc.
I’m expecting the value of xmDoc
after this to have the loaded XML document from url
, and I’m also expecting to be able to reach the code after this (that is, the MessageBox.Show("Test");
). I’m not sure what’s going on, as VS debugger is giving me a hard time (I can’t step into the MoveToContent()
method, as each of the stepping functions just bring me back to where the function, CreatePage()
is called.
this code is actually a refactor, I’ve had different code prior, where it froze on another XML-related method, namely XmlDocument.LoadXml(response)
or XmlDocument.Load(url)
. response
actually isn’t null here, I’m not sure why it’s ending the function, though.