0
you need ( ) after Read since it is a method call.
0
Ok here is all of the code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml;
namespace cs_WA_XML
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}//form1
private void Form1_Load(object sender, EventArgs e)
{
if (this.B1.Text == Convert.ToString(55) | this.B1.Text == Convert.ToString(55))
B1.Text = Convert.ToString(17);
else
B1.Text = Convert.ToString(197);
}//load
private void B1_Click(object sender, EventArgs e)
{
int I;
string strNODE;
XmlTextReader XTR = new XmlTextReader("D:\\BOTOLA_MyDocument_Projects\\My Documents\\Visual Studio 2005\\Projects\\cs_XML_World\\WA_XML\\JO.xml");
do
{
if (Convert.ToBoolean(XTR.NodeType== XmlNodeType.Element || XTR.NodeType== XmlNodeType.Text))
for (I = 1; Convert.ToBoolean(XTR.Depth); I++)
{
strNODE = "";
strNODE = strNODE + XTR.Name + "";
strNODE += XTR.NodeType ;
}
if (XTR.HasValue)
strNODE = strNODE + ": " + XTR.Value;
LB1.Items.Add(strNODE);
}
while (XTR.Read); // ..............//Here is MISTAKE
}
} //class
} //namespace
HHHHHHHHHHHHHHHELP

0
I am about to finish and I only have these last 2 code glitches!
Really.
0
why don't you post all your questions in one post? this is stupid to continue to create 6 posts about 2 problems.
and to answer your question, try:
while (XTR.Read())