<font></font><br><div class="gmail_quote">2012/1/26 Jean Mielot <span dir="ltr"><<a href="mailto:j.mielot@gmail.com">j.mielot@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi<br>
<br>
My magazine uses a php sql system that I built for importing stories into what used to be Indesign, but is now Scribus ; -)<br>
<br>
Indesign was able to import xml files and apply styles to matching tags.<br>
I am sure Scribus can do this with some python help AND one won't even have to go via an xml file and instead connect directly to the db.<br>
<br>
I just need some help with this script.<br>
<br>
1. I need to be able to fetch a record's field (perhaps with a provided id for now).<br>
2. Import the content (text) into a frame (probably the selected frame)<br>
3. apply styles to matching tags ie. "<textem>this is italics</textem>"<br>
4. Delete the tags<br>
<br>
I'm sure this is doable and I will try to do so but I think I specifically need help with 3 and 4.<br>
<br>
Any ideas?<br>
<br>
Thanks<br></blockquote></div><br>You may:<br><ol><li>parse the text with some Python XML parser</li><li>for each fragment in text:</li><ol><li>insert text fragment</li><li>select the fragment</li><li>format the fragment<br>

</li></ol></ol>-- <br>
<font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font style="font-family:Helvetica,Arial,sans-serif" color="#888888"><font size="1"><font><img style="width:75px;min-height:100px" alt="Meira" src="http://lh4.ggpht.com/_75EesisxR5g/TENbAQVXMLI/AAAAAAAADHs/ChNQzn8eOT0/meira-75x100.jpg" hspace="8" align="left" vspace="6"></font></font></font></font><hr>


</font><span style="font-family:Helvetica,Arial,sans-serif">nome: "</span><span style="font-weight:bold;font-family:Helvetica,Arial,sans-serif">José Antonio Meira da Rocha</span><span style="font-family:Helvetica,Arial,sans-serif">" </span><br style="font-family:Helvetica,Arial,sans-serif">



<small style="font-family:Helvetica,Arial,sans-serif">googletalk: email: MSN: <a href="mailto:joseantoniorocha@gmail.com" target="_blank">joseantoniorocha@gmail.com</a><br>
veículo: [ <a href="http://meiradarocha.jor.br/" target="_blank">http://meiradarocha.jor.br</a>
] <br></small>
<hr style="width:100%;height:2px;font-family:Helvetica,Arial,sans-serif">
<br>