Skip to content

XML+XPath#5076

Merged
Alkarex merged 6 commits intoFreshRSS:edgefrom
Alkarex:xml-xpath
Feb 9, 2023
Merged

XML+XPath#5076
Alkarex merged 6 commits intoFreshRSS:edgefrom
Alkarex:xml-xpath

Conversation

@Alkarex
Copy link
Member

@Alkarex Alkarex commented Feb 6, 2023

#fix #5075
Implementation allowing to take an XML document as input using an XML parser (instead of an HTML parser for HTML+XPath)

image

#fix FreshRSS#5075
Implementation allowing to take an XML document as input using an XML parser (instead of an HTML parser for HTML+XPath)
@Alkarex Alkarex added this to the 1.21.0 milestone Feb 6, 2023
@Alkarex Alkarex mentioned this pull request Feb 6, 2023
@Alkarex
Copy link
Member Author

Alkarex commented Feb 6, 2023

@mgnsk Would you be able to test this patch?

See the new XML+XPath mode:
image

@mgnsk
Copy link

mgnsk commented Feb 6, 2023

@mgnsk Would you be able to test this patch?

See the new XML+XPath mode:

image

Thanks, I'll check it out tomorrow evening.

Alkarex added a commit to Alkarex/FreshRSS that referenced this pull request Feb 7, 2023
Based on FreshRSS#5076
Transforms a JSON document to XML before using the XML+XPath method.
@Alkarex
Copy link
Member Author

Alkarex commented Feb 7, 2023

Related experimental JSON+XPath functionality: #5079

* Normal XML with XPath scraping
* @var int
*/
const KIND_XML_XPATH = 15;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recommandation: use visibilty to constant

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree when there is a mix of constants with different visibilities, or potentially the first time we introduce a constant in a class. Otherwise it does not matter as they are public by default, just like classes, and I would rather keep the same syntax than the other surrounding constants.

@mgnsk
Copy link

mgnsk commented Feb 7, 2023

@mgnsk Would you be able to test this patch?

Yes this works as expected. If the XML contains HTML, it must use a CDATA section just like RSS.

@Alkarex
Copy link
Member Author

Alkarex commented Feb 7, 2023

Thanks for the feedback!

@Alkarex Alkarex merged commit 05ae1b0 into FreshRSS:edge Feb 9, 2023
@Alkarex Alkarex deleted the xml-xpath branch February 9, 2023 12:57
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

Successfully merging this pull request may close these issues.

XML+XPath

3 participants