Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDATA-Sections lost in xpath.findvalue ... #3

Closed
GoogleCodeExporter opened this issue Feb 21, 2016 · 2 comments
Closed

CDATA-Sections lost in xpath.findvalue ... #3

GoogleCodeExporter opened this issue Feb 21, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

CDATA-Sections are lost in the string_value function:

>>> str = '<asdf><![CDATA[lalaal<hallo>lasdfasdf]]></asdf>'
>>> import xml.dom.minidom as minidom
>>> doc = minidom.parseString(str)
>>> import xpath
>>> from xpath.expr import string_value
>>> string_value(doc.firstChild.firstChild)
>>>
>>> string_value(doc)
u''
>>>



I expected:
u'lalaal<hallo>lasdfasdf'


What version of the product are you using? On what operating system?
Python 2.5, Windows 7


Attached is a patch that checks for CDATA-Sections and inserts their content 
into the string-value.


Original issue reported on code.google.com by janoscharlipp@gmail.com on 2 Dec 2010 at 7:31

Attachments:

@GoogleCodeExporter
Copy link
Author

Oops!  Thanks for the patch.

Original comment by damien.neil on 6 Dec 2010 at 11:46

@GoogleCodeExporter
Copy link
Author

This issue was closed by revision r29.

Original comment by damien.neil on 1 Feb 2011 at 8:21

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant