MailBee.NET Objects 4.0

Element.Process Method 

Applies the specified tag processing rules to the current element and any its child elements, calling a delegate for every tag which matches the specified rules.

public void Process(
   RuleSet rules,
   ProcessElementDelegate del
);

Parameters

rules
A set of rules to be applied during processing the element.
del
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.

Remarks

This method alters the element during processing. To return the modified version while leaving the element contents intact, use ProcessToString method.

If you specified del delegate, Process 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 method.

Exceptions

Exception TypeCondition
MailBeeInvalidArgumentExceptionrules is a null reference (Nothing in Visual Basic).

Example

The example is available in AddTagProcessingCondition topic.

See Also

Element Class | MailBee.Html Namespace | ProcessToString