Class library usage, coding and language questions.
-
ggaspari
- Posts: 26
- Joined: Tue Apr 10, 2012 8:40 am
Post
by ggaspari » Thu Aug 30, 2012 2:57 pm
Hi guys,
Where can I find a simple sample about xml parsing ?
Basically, I need to pull out just a few items, like testcasename/result but I have no experience with xml so a simple code could help a lot
thank you
-
Support Team
- Site Admin

- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Post
by Support Team » Thu Aug 30, 2012 4:35 pm
Hello,
Here is a little code snippet that parses information out from our report file and writes it into the console:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("c:\\PATH\\TO\\YOUR\\FILE\\RanorexLogFile.rxlog");
XmlNode reportInfos = xmlDoc.SelectSingleNode("//report/activity/activity/activity");
foreach (XmlAttribute attr in reportInfos.Attributes)
{
Console.WriteLine(attr.InnerText);
}
I hope this is what you need.
Regards,
Bernhard
Ranorex Support Team
.

-
ggaspari
- Posts: 26
- Joined: Tue Apr 10, 2012 8:40 am
Post
by ggaspari » Fri Aug 31, 2012 3:18 pm
definitely yes!
thank you