Commit b7867846 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add a simple transform that extract all texts in XML.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38944 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9e5c15d2
......@@ -22,6 +22,7 @@ modules = [
'safe_html', # extract <body> and remove potentially harmful tags
'html_body', # extract only the contents of the <body> tag
'html_to_text', # re based transform
'xml_to_text', # re based transform
'text_to_html', # wrap text in a verbatim env
'text_pre_to_html', # wrap text into a pre
'png_to_text',
......
from Products.PortalTransforms.libtransforms.retransform import retransform
class xml_to_text(retransform):
inputs = ('text/xml', 'application/xml')
output = 'text/plain'
def register():
return xml_to_text("xml_to_text",
('<[^>]*>', ' '),
)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment