Render a Table MessageElement as html.

        :returns: The html representation of the Table MessageElement
        :rtype: basestring
339937
def to_html(self):
        
        table = '<table%s>\n' % self.html_attributes()
        if self.caption is not None:
            if isinstance(self.caption, MessageElement):
                caption = self.caption.to_html()
            else:
                caption = self.caption
            table += '<caption>%s</caption>\n' % caption
        if self.header:
            if isinstance(self.header, MessageElement):
                header = self.header.to_html()
            else:
                header = self.header
            table += '<thead>%s</thead>' % header
        table += '<tbody>\n'
        for row in self.rows:
            table += row.to_html()
        table += '</tbody>\n</table>\n'

        return table
985410
def html(self):
        
        # No empty tooltips
        if self.description:
            tooltip = 'tooltip="{}"'.format(self.description)
        else:
            tooltip = ''

        return entry_html(
            title=self.title,
            thumbnail=self.thumbnail,
            link=self.html_link,
            tooltip=tooltip)
348032
def get_help_html(message=None):
    

    html = html_help_header()

    if message is None:
        message = dock_help()

    html += message.to_html()
    html += html_footer()
    return html
726754
def html(self, label, *msg):
        
        lbl = "[" + label + "] "
        txt = lbl + " " + " ".join(list(msg))
        if self.notebook is True:
            html = HTML(txt)
            display(lbl + html)
        else:
            print(lbl + txt)
923298
def render_as_html(self, full=False):
        """"""
        from jinja2.debugrenderer import render_traceback
        return u'%s\n\n<!--\n%s\n-->' % (
            render_traceback(self, full=full),
            self.render_as_text().decode('utf-8', 'replace')
        )
891777
def gen_html(row_list):
        
        table = "<table>"
        for row in row_list:
            table += "<tr>"
            cells = row["cells"]
            for c in cells:
                t = c['cell'] if c else ''
                table += t
            table += "</tr>"
        table += "</table>"
        return table
788322
def get_message_plain_text(msg: Message):
    
    if msg.body:
        return msg.body

    if BeautifulSoup is None or not msg.html:
        return msg.html

    plain_text = '\n'.join(line.strip() for line in
                           BeautifulSoup(msg.html, 'lxml').text.splitlines())
    return re.sub(r'\n\n+', '\n\n', plain_text).strip()
250480
def render_xml(result, cfg, **kwargs):
    
    # Raw mode
    if cfg.dis == 'raw':
        return {'data': {'text/plain': result.decode('utf-8')},
                'metadata': {}}
    # Table
    try:
        import xml.etree.cElementTree as ET
    except ImportError:
        import xml.etree.ElementTree as ET
    root = ET.fromstring(result)
    try:
        ns = {'ns': re.match(r'\{([^}]+)\}', root.tag).group(1)}
    except Exception:
        raise KrnlException('Invalid XML data: cannot get namespace')
    columns = [c.attrib['name'] for c in root.find('ns:head', ns)]
    results = root.find('ns:results', ns)
    nrow = len(results)
    j = xml_iterator(columns, results, set(cfg.lan), add_vtype=cfg.typ)
    n, data = html_table(j, limit=cfg.lmt, withtype=cfg.typ)
    data += div('Total: {}, Shown: {}', nrow, n, css="tinfo")
    return {'data': {'text/html': div(data)},
            'metadata': {}}
513454
public static function renderMessages() : string {
		$result = '';
		// we need to see if we have postponed messages and render them first
		$postponed = Session::get(['numbers', 'messages']);
		if (!empty($postponed)) {
			Session::set(['numbers', 'messages'], []);
			foreach ($postponed as $k => $v) {
				$result.= \HTML::message(['options' => $v, 'type' => $k]);
			}
		}
		// regular messages
		$messages = Application::get(array('messages'));
		if (!empty($messages)) {
			foreach ($messages as $k => $v) {
				$result.= \HTML::message(['options' => $v, 'type' => $k]);
			}
		}
		return $result;
	}
1119233
def as_sql(self):
        

        labels, data = self._get_table()
        table = SqlTable(labels, data, "{:.3f}", "\n")
        return str(table)
705454
function render(msg, cb, ms, level) {
    if (typeof cb === 'number') {
      ms = cb;
      cb = null;
    }

    return new Message({
      parentNode: '#msgbox',
      model: {
        msg: msg,
        close: cb,
        timeout: ms || util.TOAST_DURATION,
        level: level
      }
    }).render();
  }
360979
def to_markdown(self):
        
        out = self._get_header()
        out += "\n"

        for row in self.table:
            out += self._get_row(row)
            out += "\n"

        return out
130879
def compile(self):
        
        self.content = "".join(map(lambda x: x.compile(), self.children))
        return self._generate_html()
619436
protected function _toHtml() {
        if ($this->_fixMessages()) {
            if ($this->_shouldUseInjection()) {
                $html = $this->renderView();
            } else {
                $this->_loadMessages();
                $this->_loadSavedMessages();
                if (count($this->getMessages())) {
                    $html = $this->_real_toHtml();
                } else {
                    // Prevent returning an empty <ul></ul>
                    $html = '';
                }
            }
        } else {
            $html = $this->_real_toHtml();
        }
        $this->_directCall = false;
        return $html;
    }
149500
def html(self):
        
        return self.render(self.data, self.proj, self.obj)
1058820
def as_markdown(self):
        

        labels, data = self._get_table()
        table = MarkdownTable(labels, data)
        return str(table)
886755
private String htmlEnd() {

        StringBuffer html = new StringBuffer(512);
        html.append("\t\t\t\t\t\t</td>\n");
        html.append("\t\t\t\t\t</tr>\n");
        html.append("\t\t\t\t</table>\n");
        html.append("\t\t\t</div>\n");
        html.append("\t\t</td>\n");
        html.append("\t</tr>\n");
        html.append("</table>\n");
        return html.toString();
    }