8000 XML parsing with CDATA not working · Issue #817 · thp/urlwatch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
XML parsing with CDATA not working #817
Open
@oxivanisher

Description

@oxivanisher

I try to monitor new releases of factorio. But it seems that fields with CDATA fields are always returned empty.

Factorio publishes the new releases in their phpbb which has a atom feed. The entry that should work IMHO is:

name: "Factorio Release"
url: 'https://forums.factorio.com/app.php/feed/forum/3'
filter:
  - xpath: '//entry[1]/title/text()'

One of the entries looks like this:

<entry>
	<author><name><![CDATA[FactorioBot]]></name></author>
	<updated>2024-04-11T15:29:30</updated>
	<published>2024-04-11T15:29:30</published>
	<id>https://forums.factorio.com/viewtopic.php?t=112937&amp;p=608190#p608190</id>
	<link href="https://forums.factorio.com/viewtopic.php?t=112937&amp;p=608190#p608190"/>
	<title type="html"><![CDATA[Releases • Version 1.1.107]]></title>
	<category term="Releases" scheme="https://forums.factorio.com/viewforum.php?f=3" label="Releases"/>
	<content type="html" xml:base="https://forums.factorio.com/viewtopic.php?t=112937&amp;p=608190#p608190"><![CDATA[
	<strong class="text-strong">Modding</strong>  <ul>    <li>Added an optional "mods" to simulation definitions.</li>  </ul><strong class="text-strong">Scripting</strong>  <ul>    <li>Disabled the majority of the lua "debug" library due to security issues.</li>  </ul><strong class="text-strong">Bugfixes</strong>  <ul>    <li>Fixed LuaEntity::set_request_slot would not accept count of 0. (<a href="https://forums.factorio.com/110676" class="postlink">110676</a>)</li>    <li>Fixed first tutorial level advancing to a wrong story step after drill is set in quickbar. (<a href="https://forums.factorio.com/109315" class="postlink">109315</a>)</li>    <li>Fixed mods sorting order by last highlighted and by last updated. (<a href="https://forums.factorio.com/106420" class="postlink">106420</a>)</li>  </ul>Use the automatic updater if you can (check experimental updates in other settings) or download full installation at <a href="https://www.factorio.com/download/experimental" class="postlink">https://www.factorio.com/download/experimental</a>.<p>Statistics: Posted by <a href="https://forums.factorio.com/memberlist.php?mode=viewprofile&amp;u=7177">FactorioBot</a> — Thu Apr 11, 2024 3:29 pm</p><hr />
	]]></content>
</entry>

I am able to get all the fields not containing a CDATA but none containing one. So for example '//entry[1]/id/text()' works without a problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0