There is no special function for this action. After having loaded the text with Load() function you'll have to find a proper place for insertion yourself. You can use regular expressions or traditional .NET functions like IndexOf(). There is also a useful helper DotNetWikiBot function called Bot.GetMatchesPositions() - http://dotnetwikibot.sourceforge.net/help/html/M_DotNetWikiBot_Bot_GetMatchesPositions.htm . You can use it to find sections and subsections like this:
For example, a page has 5 sections (section1...
Section5). I want to append some text to section4. How do I do this with dotnetwikibot?
Thanks in advance,
Sanketh
There is no special function for this action. After having loaded the text with Load() function you'll have to find a proper place for insertion yourself. You can use regular expressions or traditional .NET functions like IndexOf(). There is also a useful helper DotNetWikiBot function called Bot.GetMatchesPositions() - http://dotnetwikibot.sourceforge.net/help/html/M_DotNetWikiBot_Bot_GetMatchesPositions.htm . You can use it to find sections and subsections like this:
Last edit: CodeDriller 2013-12-05
I thank CodeDriller for this hint and add the following code to the page class.
A specific section text is called by SectionContents[sectionNo]. Juergen
By the way, I use "partial class Page" in order to simplify those additions by adding my own cs file.
Last edit: Juergen Thomas 2015-03-15