Input:
<text>
Please see the registered mark® .
Please see the copy right ©.
Please see the Trade mark™.
</text>
Output:
<text>
Please see the registered mark<registeredTrademark></registeredTrademark>.
Please see the copy right <copyright></copyright>.
Please see the Trade mark <trademark></trademark>.
</text>
I need to replace all special symbols with the elements as shown above
Can any one help.
Thanks
This transformation is more efficient by avoiding char-by-char recursion and using “biggest-possible-step” recursion:
When applied to the provided XML document:
the correctly-replaced text is produced: