ElementProcessToString Method |
Applies the specified tag processing rules to the copy of the current element and any its child elements, calling a delegate
for every tag which matches the specified rules, and returns the resulting
OuterHtml as a string.
Namespace: MailBee.HtmlAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public string ProcessToString(
RuleSet rules,
ProcessElementDelegate del
)
Public Function ProcessToString (
rules As RuleSet,
del As ProcessElementDelegate
) As String
Parameters
- rules
- Type: MailBee.HtmlRuleSet
A set of rules to be applied during processing the element. - del
- Type: MailBee.HtmlProcessElementDelegate
The delegate to be called for every HTML element which satisfies conditions of any rule in rules, or
a null reference (Nothing in Visual Basic) if no delegate should be called.
Return Value
Type:
StringA string containing
OuterHtml of the current
Element copy which was modified
accordingly the specified rules.
Exceptions Remarks This method does not alter the element during processing (all operations take place on its temporary copy).
If you specified del delegate, ProcessToString(RuleSet, ProcessElementDelegate) method will execute it whenever
any rule matches. It's also possible to define a rule which does nothing except calling the delegate.
You can add such a rule using AddTagProcessingCondition(String, TagAttributeCollection) method.
Examples See Also