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

Library does not read CDATA sections #13

Closed
irnc opened this issue Oct 15, 2012 · 5 comments
Closed

Library does not read CDATA sections #13

irnc opened this issue Oct 15, 2012 · 5 comments

Comments

@irnc
Copy link

irnc commented Oct 15, 2012

For example from string <phrase section="default" code="widgethome"><![CDATA[Home]]></phrase> only attributes are read, resulting object does not have '#' property.

@SaltwaterC
Copy link
Owner

The library usually handled root elements that have child nodes. The CDATA was only implemented for the child nodes. I'll make a patch.

@irnc
Copy link
Author

irnc commented Oct 18, 2012

Actually when I tested, it does not worked even on child nodes. XML string was as follows (with XML declaration included):

<lang>
<phrase section="default" code="widgethome"><![CDATA[Home]]></phrase>
</lang>

@SaltwaterC
Copy link
Owner

Doesn't work when the child nodes have attributes. There's an unit test that has a CDATA element from a WordPress feed. Thank you for your feedback. I'll keep you posted.

@SaltwaterC
Copy link
Owner

Thanks. I'll have a look and write some tests after dealing with a couple of other libraries. I am well aware that the algorithm isn't quite straight forward. It took me a while till I understood what Brian White did.

I totally forgot about this issue as it didn't fit then in my schedule. Sorry about that. Remembered about it yesterday when I started to rewrite some of my test suites and integrate my stuff with Travis CI.

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

No branches or pull requests

3 participants
@irnc @SaltwaterC and others