The following worked for me in a Text::Restructured:
.. mathml:: newsymbol{"|"}{"∣" "\mid"} a | b
.. mathml:: newsymbol{"!|"}{"∤" "\not\mid"} a !| b
.. mathml:: 3+1/{2+1/{3+1/7}}
The first line defines a new symbol "|" to use the HTML entity "∣" or
LaTeX command "\mid" and then uses it to produce "a divides b". The second
is similar except it defines "!|" to mean "not divides". The third created
the continued fraction.
Here's the HTML that gets produced:
<?xml version="1.0" encoding="utf8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<meta name="generator" content="prest release 0.3.40" />
</head>
<body>
<div class="document">
<p><math title="newsymbol{"|"}{"&#x2223;" "\mid"} a | b" xmlns="&mathml;"><mstyle displaystyle="true"><mi>a</mi><mo>∣</mo><mi>b</mi></mstyle></math></p>
<p><math title="newsymbol{"!|"}{"&#x2224;" "\not\mid"} a !| b" xmlns="&mathml;"><mstyle displaystyle="true"><mi>a</mi><mo>∤</mo><mi>b</mi></mstyle></math></p>
<p><math title="3+1/{2+1/{3+1/7}}" xmlns="&mathml;"><mstyle displaystyle="true"><mn>3</mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn>2</mn><mo>+</mo><mfrac><mn>1</mn><mrow><mn>3</mn><mo>+</mo><mfrac><mn>1</mn><mn>7</mn></mfrac></mrow></mfrac></mrow></mfrac></mstyle></math></p>
</div>
</body>
</html>