Did I find the right examples for you? yes no

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

        def xml2str(s):
    return (s or '').replace('&','&').replace('<','<').replace('>','>')
        


src/o/p/openerp-core-7.0.406/openerp/report/render/rml2pdf/trml2pdf.py   openerp-core(Download)
    def _drawString(self, node):
        v = utils.attr_get(node, ['x','y'])
        text=self._textual(node, **v)
        text = utils.xml2str(text)
        self.canvas.drawString(text=text, **v)
 
    def _drawCenteredString(self, node):
        v = utils.attr_get(node, ['x','y'])
        text=self._textual(node, **v)
        text = utils.xml2str(text)
    def _drawRightString(self, node):
        v = utils.attr_get(node, ['x','y'])
        text=self._textual(node, **v)
        text = utils.xml2str(text)
        self.canvas.drawRightString(text=text, **v)
                    txt_n.text = self.canvas and str(self.canvas.getPageNumber()) or ''
                else:
                    txt_n.text = utils.xml2str(self._textual(n))
            txt_n.tail = n.tail and utils.xml2str(utils._process_text(self, n.tail.replace('\n',''))) or ''
            rc1 += etree.tostring(txt_n)