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

Get information from namespace #3

Open
slolo2000 opened this issue Sep 5, 2017 · 1 comment
Open

Get information from namespace #3

slolo2000 opened this issue Sep 5, 2017 · 1 comment

Comments

@slolo2000
Copy link

Hello,

If a RSS feed contains elements with namespace (see below), what is the way to get informations like content:encoded or dc:xxx in JSON?

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>feed title</title>
    <image>
      <url>http://www.xxxxx.com/images/logo.gif?v1.0</url>
      <title>feed image title</title>
      <link>http://www.xxxxx.com/</link>
    </image>
    <link>http://www.xxxxx.com/</link>
    <description>feed description</description>
    <language>en-us</language>
    <dc:creator>feed creator</dc:creator>
    <item>
      <link>http://www.xxxxx.com/aaaa/test-1234567890</link>
      <guid>http://www.xxxxx.com/aaaa/test-1234567890</guid>
      <title>item title</title>
      <pubDate>Thu, 31 Aug 2017 00:00:00 GMT</pubDate>
      <dc:language>en-us</dc:language>
      <dc:creator>item creator</dc:creator>
      <description>item description</description>
      <content:encoded>
<![CDATA[<h2>Test content</h2>
<p><img src="http://www.xxxxx.com/img/img_1.png" alt="..." title="..."  style="float:left;margin:0 1em 1em 0;border:1px solid #000;" />
content ... content - <span style="color:#666">TEST</span><br /><strong style="color:#333">style test</strong>
</p>
<p style="clear:left">
<a href="http://www.xxxxx.com/aaa/bbb/test-1122334455666">More...</a>
</p>]]>
      </content:encoded>
    </item>
  </channel>
</rss>

Do you think you could add it to your PHP class?

Thanks in advance and have a nice day.

@lawrencenull
Copy link

Been having the same problem, namespaces. Can't render images without it really because they all use namespaces.

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

2 participants