Re: Patch for kaa.xmlutils. Add support for more than one text element inside an element

Jason Tackaberry <[email protected]>
Newsgroups gmane.comp.video.freevo.devel
Message-ID <1281550333.1003.216.camel@arrakis>
Hi John,

On Tue, 2010-08-10 at 22:05 +0100, John Molohan wrote:
> This patch addresses this and allows elements to contain more than one 
> text element so that tags such as in this example are handled correctly:
> 
> <url mplayer-options="-user-agent 
> QuickTime7.6.2">http://trailers.apple.com/movies/universal/adjustmentbureau/adjustmentbureau-tlr1_a720p.m4v</url>


But the url element above still has only one child element.  It has one
attribute (mplayer-options) and one child node.

I can't reproduce the problem you describe.  I have a file called
test.xml:

        <fxd>
            <url mplayer-options="-user-agent
        QuickTime7.6.2">http://trailers.apple.com/movies/universal/adjustmentbureau/adjustmentbureau-tlr1_a720p.m4v</url>
        </fxd>

And:

        >>> import kaa.xmlutils 
        >>> print kaa.xmlutils.create('test.xml').toxml()
        <?xml version="1.0" encoding="UTF-8"?>
        <fxd>
            <url mplayer-options="-user-agent
        QuickTime7.6.2">http://trailers.apple.com/movies/universal/adjustmentbureau/adjustmentbureau-tlr1_a720p.m4v</url>
        </fxd>


This looks right to me.  Can you tell me how to reproduce the problem?

(I've not actually looked this xmlutils API before.  I'm tempted to
deprecate __getattr__ in favor of __getitem__ and implement
__setitem__.)

Cheers,
Jason.


------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.