B
Balint Toth
Hi,
I read an XML document with the following code:
const String filename = "probe.xml";
XmlTextReader reader = new XmlTextReader(filename);
bool masodik = false;
while (reader.Read()==true)
{
switch (reader.Name)
{
case "Title":
reader.Read();
if (!masodik)
{
myList.Items.Add(reader.Value);
}
masodik = !masodik;
break;
}
}
reader.Close();
The XML file containt something like:
<Title>mytitle</Title>
<Item>First entry</Item>
<Item>2nd entry</Item>
<Item>3rd entry</Item>
<Item>4th entry</Item>
<Item>5th entry</Item>
If I put an accent letter in the XML:
<Title>mytitle õúûóüúáéí</Title>
<Item>First entry</Item>
....
the application exist with some error message (not exception).
What can be the problem?
Best regards,
Bálint Tóth
I read an XML document with the following code:
const String filename = "probe.xml";
XmlTextReader reader = new XmlTextReader(filename);
bool masodik = false;
while (reader.Read()==true)
{
switch (reader.Name)
{
case "Title":
reader.Read();
if (!masodik)
{
myList.Items.Add(reader.Value);
}
masodik = !masodik;
break;
}
}
reader.Close();
The XML file containt something like:
<Title>mytitle</Title>
<Item>First entry</Item>
<Item>2nd entry</Item>
<Item>3rd entry</Item>
<Item>4th entry</Item>
<Item>5th entry</Item>
If I put an accent letter in the XML:
<Title>mytitle õúûóüúáéí</Title>
<Item>First entry</Item>
....
the application exist with some error message (not exception).
What can be the problem?
Best regards,
Bálint Tóth