help with XML

https://github.com/win-ini/niuniakweb/tree/master <- my code if it's needed. so, I'm having trouble with XmlReader. I'm having it parse these from a URI, but it seems to get stuck on the ReadElementContentAsString() method (I've set up message boxes as debugging behaviour, and the one right before the call to the method appears, but nothing ever happens, and the next one's never triggered. the app isn't frozen, though). edit: here's exactly where it gets stuck https://github.com/win-ini/niuniakweb/blob/master/niuniakweb1/Form1.cs#L81
5 Replies
tera
tera5mo ago
you should try inspecting what happens with debugger put a breakpoint and step through relevant calls
Intel 80486DX4 (pichu___.)
well, stepping out just continues execution, and stepping over or stepping out brings me back to where I called the method. I put the breakpoint on the variable definition for newNode, but I don't know how to navigate to the function or step through what it does (can you even?)
Intel 80486DX4 (pichu___.)
ha, is this the issue?
No description
Intel 80486DX4 (pichu___.)
after some refactoring, the relavant code snippet now:
ClearPage();
HttpClient hpClient = new();
XmlDocument xmDoc = new();
XmlReader xmRead = XmlReader.Create(url);
string response = await hpClient.GetStringAsync(url);
string nodeOuterText;
Point coords = new(10, 70);
lblMinorErrorReporter.Text = MinorErrorStrings[10];
xmRead.MoveToContent();
xmRead.Read();
xmDoc.Load(xmRead);
MessageBox.Show("Test");
ClearPage();
HttpClient hpClient = new();
XmlDocument xmDoc = new();
XmlReader xmRead = XmlReader.Create(url);
string response = await hpClient.GetStringAsync(url);
string nodeOuterText;
Point coords = new(10, 70);
lblMinorErrorReporter.Text = MinorErrorStrings[10];
xmRead.MoveToContent();
xmRead.Read();
xmDoc.Load(xmRead);
MessageBox.Show("Test");
it now gets stuck at xmRead.MoveToContent()
Want results from more Discord servers?
Add your server