I have a thirdparty library which returns "XHTML" string which I would
like to tweek a little bit before displaying it. It cannot be repaired
with styles alone. I'm currently displaying the output like this (in
KID):

    ${XML(xraw)}

I tried two different approaches in my controllers:

    # 1
    import kid
    nodes = kid.pull.XML(xraw)

but I don't know what to do with this list (generator) of nodes. I was
expecting a tree.

    # 2
    import elementtree
    xraw = '<xml>%s</xml>' % xraw
    root = elementtree.ElementTree.XML(xraw)

but this has problems with my national characters as well as with
"&nbsp;". Same string can be parsed in KID and not here.

Any ideas?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to