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
AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

AndroidC++BuilderDelphiFiremonkeyIOSOSXWindows

Significant Update Available For Delphi FireMonkey 10.4.1 On Android, IOS, OSX, Windows, And Linux

C++BuilderDelphiIDEWindows

Professional SVG Icon Image List For Delphi 10.4 FireMonkey On Windows

AndroidC++BuilderDelphiFiremonkeyIOSLiveBindingsOSXWindows

Top Tips And Tricks To Speed Up Development With Delphi 10.4 FireMonkey On Android and IOS

Sign up for our Newsletter and
stay informed

Leave a Reply