CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Posts
    1

    XML problem that only occurs when debugging

    When I step through this code in the debugger, nothing prints out but if I simply allow the program to run it prints out the names of each element in the Xml file.

    What's even more confusing is that the information in my watch window does not correspond to what is returned when I mouse over variables.

    XmlTextReader reader = new System.Xml.XmlTextReader(strUrl);
    try
    {
    while (reader.Read())
    {
    switch (reader.NodeType)
    {
    case XmlNodeType.Element:
    Console.Write("" + reader.Name + "\n");
    break;
    }
    }
    }

    I have .Net Framework 1.1 running on my machine and MS development Environment 2003 Ver 7.1.3088

    I'm also open to using alternative XML libraries that would allow me to actively debug and step through code if anyone knows of any.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: XML problem that only occurs when debugging

    not sure why it happens but you could try XmlDocument (DOM) or Xml Serialization (XmlSerializer) technique.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured