Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkeyIOS

Parse An RSS Feed Using Delphi XE5 Firemonkey On Android And IOS

Parse RSS Feed In Delphi Firemonkey Android IOSIf you want to manually parse an RSS feed and not use Livebindings here is a code snippet to do that using the built in TXMLDocument. First drop a TXMLDocument on the Form and be sure to set the DOMVendor to ‘ADOM XML v4’ (this will allow it to work on Android and IOS). Next up get your XML string from your REST Client or load it from a file and using XMLDoc.LoadFromXML() to load it into the XML component. Walk through the child nodes until you get to the node depth that you want (in the case of an RSS feed this is three levels deep. Check the NodeName to see if it the one you want (like Title) and then read out the Text value to get the value of that node. If there is a different node name that isn’t in the same you can add code to look for it instead of the sample ones I provided. Check out the full source code snippet below:

This code snippet is in the the AfterExecute event of a TRESTRequest component and reads out the XML from the Content property. Download a copy of the sample code snippet.


Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores


DelphiCon 2020 FireMonkey Sessions Available Starting November 19


Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed

Leave a Reply