DotNetWikiBot Framework Documentation
This helper function deletes everything before startTag and everything after endTag in the provided XML/XHTML source code and then inserts back the deleted DOCTYPE definition and root element of XML/XHTML document.

Namespace: DotNetWikiBot
Assembly: DotNetWikiBot (in DotNetWikiBot.dll) Version: 0.0.0.0

Syntax

C#
public static string GetXMLSubstring(
	string text,
	string startTag,
	string endTag,
	bool removeTags
)

Parameters

text
Type: System..::..String
Source text.
startTag
Type: System..::..String
A tag which identifies the beginning of target content.
endTag
Type: System..::..String
A tag which identifies the end of target content.
removeTags
Type: System..::..Boolean
If true, specified startTag and endTag will be removed from resultant string.

Return Value

Type: String
Returns part of the source XML markup.

Remarks

This function is very basic, it's not a true parser and thus it must not be used to parse documents generated outside MediaWiki software.

See Also