prayagverma / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
1 stars 0 forks source link

ATOM XML content element with mixed content #664

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use the atom.ContentFromString() method to create a <content> element from 
the attached XML document.

What is the expected output? What do you see instead?

I would expect to see the content element "as is" in the rendered feed document 
which I've attached in desired_content.xml. Instead I get what's in the 
attached resultant_content.xml document.

It would appear the ContentFromString is losing all but the 1st text node in 
the mixed content elements <description role="drol:shotlist"> and <description 
role="drol:script">.

What version of the product are you using?
gdata 2.0.17

Please provide any additional information below.

I was able to create the desired output by modifying the ExtensionElement class 
in the atom/__init__.py module as attached.

Specifically I've added a tail property to include "trailing" text nodes.

I am new to Python so this may be a naive approach and not general.

Thanks for any help.

Fred

Original issue reported on code.google.com by strauss....@gmail.com on 23 May 2013 at 7:04

Attachments: