Best method joining string inside Object ( HTMLcollection )? I using microsoft studio 2008, NET 3.5, with HTMLagilityPack
Here the HTML
<div class="content">
<ul>
<li>Text that I want to scrape </li>
<li>Text that I want to scrape </li>
<li>Text that I want to scrape </li>
</ul>
</div>
and here my code
var productfeature =
document.DocumentNode.SelectNodes("//div[@class='content']/ul/li");
if (productfeature != null)
{
StringBuilder sb = new StringBuilder();
foreach (HtmlNode node in productfeature)
{
//Make sure nothing {} inside title
string safeint = node.InnerText.Replace("}", "").Replace("{","");
sb.Append(safeint + "}"); //adding } for marking
}
}
Some article in here said, its better using string.join, buat I dont know how to doing this with object element
NB: I want something faster and light..