Changing data of xhtml document

Discussion in 'Python' started by Thanos Tsouanas, Aug 14, 2005.

  1. Hello list!

    I've got a unicode string which holds an xhtml website, begining with
    <!DOCTYPE ... and a functions which alters strings in a certain way.

    I want to replace all actual data in this xhtml unicode string with the
    function's output. (By 'actual data' I mean anything that

    I thought I should use the XMLGenerator package, but first, I don't
    like it's output, and second, it complaints about the <!DOCTYPE ...>
    tag. Also, it writes the <?xml ?> tag which I want to avoid at this
    stage.

    Are there any really easy solutions to this problem?
    Any modules that could be helpful for slight modification of such
    sgmlish files? The downside of SGMLParser is that I have to override
    all parser functions to actually leave everything intact instead of
    doing nothing and override characters(data) to print the altered data.

    Thanks in advance!

    --
    Thanos Tsouanas .: My Music: http://www.thanostsouanas.com/
    http://thanos.sians.org/ .: Sians Music: http://www.sians.org/
     
    Thanos Tsouanas, Aug 14, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    2
    Views:
    527
    Chris Smith
    Jan 14, 2005
  2. mike
    Replies:
    3
    Views:
    515
    Thomas Weidenfeller
    Jan 24, 2005
  3. mike
    Replies:
    6
    Views:
    1,351
    Andy Dingley
    Oct 14, 2004
  4. Replies:
    7
    Views:
    951
  5. Ion Freeman
    Replies:
    17
    Views:
    862
    Tom Anderson
    Jul 11, 2009
Loading...

Share This Page