Ignore:
Timestamp:
28/09/10 13:47:26 (10 years ago)
Author:
astephen
Message:

Introduced use of pygments for XML rendering.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/jobviewer.py

    r7159 r7538  
    55import urllib 
    66import xml.etree.ElementTree as ET 
     7from pygments import highlight 
     8from pygments.lexers import XmlLexer 
     9from pygments.formatters import HtmlFormatter 
    710 
    811from pylons import request, response, session, tmpl_context as c 
     
    224227    def _htmlifyXML(self, xml): 
    225228        "Returns html string that will make XML look ok on HTML page." 
     229 
     230        return highlight(xml, XmlLexer(), HtmlFormatter()) 
    226231        xml1 = xml.replace("<", "&lt;").replace(">", "&gt;").replace("\n", "<br>") 
    227232 
Note: See TracChangeset for help on using the changeset viewer.