Sure. Change the sub to:
sub subst { my ($twig, $value) = @_; $value->subs_text ('^s$', 'x'); $value->print (); }
I can thoroughly recommend the XML::Twig documentation by the way. It is long, but there are some really good examples.
In reply to Re^3: Replace MathML content using Twig
by GrandFather
in thread Replace MathML content using Twig
by renovatio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |