anil ergin

anil ergin

  • NA
  • 2
  • 490

XmlTextReader I couldn't getting my data

Aug 4 2017 7:30 AM

Merhaba

I need to get value a column: I wrote this:

XmlTextReader myReader = new XmlTextReader("./Redirect.xml");
myReader.Read();
while (myReader.Read())
{
if (myReader.NodeType==XmlNodeType.Element&&myReader.Name=="FL")
{
myReader.MoveToAttribute("val");
if (myReader.Value == "POTENTIALID")
{
Console.WriteLine(myReader.Value);
}
}

Print:

POTENTIALID

POTENTIALID

POTENTIALID

POTENTIALID

POTENTIALID

...

XML

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/crm/private/xml/Potentials/getRecords">
<result>
<Potentials>
<row no="1">
<FL val="POTENTIALID">1786565000003693003</FL>
<FL val="SMOWNERID">1786565000000093003</FL>
<FL val="Potential Owner"><![CDATA[Deneme]]></FL>
<FL val="Amount"><![CDATA[21000]]></FL>
</row>

<row no="2">

...

can you help me how can I reach all pottentialIds 1786565000003693003(POTENTIALID) 


Answers (1)