Hi Together
I got an answer about this on the Kid Mailinglist.
Solution One was:
# assuming your template is stored in test.kid
import kid
from kid.serialization import XMLSerializer
template = kid.load_template('test.kid')
t = template.Template()
serializer = XMLSerializer(decl=1)
serializer.strip_whitespace = True
print t.serialize(output=serializer)
Solution Two was:
serializer = kid.HTMLSerializer()
serializer.strip_whitespace = True
print your_template.serialize(output=serializer)
How is the way when i work with turbogear widgets? is there a way to
override the Render method?
Thanks best Regards Ivo
2006/5/10, Ivo Looser <[EMAIL PROTECTED]>:
> Hi Together
>
> First i just Time to say thanks to all Contributors for the new Release.
>
> Now the Question:-)
> I have a Widget witch has a Template like this.
>
> <div xmlns:py="http://purl.org/kid/ns#" class="tests" id="test"
> py:if="len(products) > 0">
> <h2>a aktionen</h2>
> <table>
> <tr>
> <td>test...</td>
> </tr>
> </table>
> </div>
>
>
> Because it should no space or tab be visible in the output i whould
> like to strip all tabs and spaces.
>
> Basicly the Output should look like this:
> <h2>a aktionen</h2><table><tr><td>test...</td></tr></table>
>
> Someone now how i can do that in kid?
>
> Thanks alot.
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---