SEESenv/scripts/rst2docbook.py
changeset 33 bc535262231d
parent 30 f66b0a5ebf40
child 36 a542eb905ced
equal deleted inserted replaced
32:de7ac08f237b 33:bc535262231d
   118             title.text=title_element.text
   118             title.text=title_element.text
   119             article.insert(1,tree)                
   119             article.insert(1,tree)                
   120             
   120             
   121     xml_string=ET.tostring(chapter)
   121     xml_string=ET.tostring(chapter)
   122     xml_string=xml_string.replace('\\',' ')    
   122     xml_string=xml_string.replace('\\',' ')    
   123     xml_string=re.sub('<document[-A-Za-z=/_" .0-9]*>' ,'',xml_string)
   123     xml_string=re.sub('<document[-A-Za-z=/_" .0-9:]*>' ,'',xml_string)
   124     xml_string=re.sub('</document>' ,'',xml_string)
   124     xml_string=re.sub('</document>' ,'',xml_string)
   125 #    xml_string=re.sub('</section></section></section>' ,'</section></section>',xml_string)    
   125 #    xml_string=re.sub('</section></section></section>' ,'</section></section>',xml_string)    
   126     return xml_string
   126     return xml_string
   127 
   127 
   128     
   128