Hi everybody,
I have a file with some tags like html.
<instance id="bass.1000000" docsrc = "BNC/A0C">
<answer instance="bass.1000000" senseid="bass%fish"/>
<context>
Try it with grilled sea <head>bass</head> and fennel.
</context>
</instance>
I need to parse it and retrieve some information like id and senseid in answer tag.
How can I do this?
I add <html> &<body> and write this code. But it does not work.
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(sourcefile);
HtmlNodeCollection collection = doc.DocumentNode.SelectNodes("//instance");
foreach (HtmlNode n in collection)
{
label1.Text+=n.Attributes["id"].Value;
}