Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
RSS Feeds |
Tue, Oct 24 2017 4:07 PM | Permanent Link |
thomh | Hi,
Is it possible to display RSS feeds in EWB? // Thom |
Wed, Oct 25 2017 4:14 AM | Permanent Link |
Matthew Jones | thomh wrote:
> Is it possible to display RSS feeds in EWB? RSS is just XML, and I did XML processing in EWB v1 so it must be possible. That said, I'm struggling to find my code as everything went JSON, and EWB v1 is quite primative compared to the current version - lacking things like searching across files! Okay, found some - it is related to "DOM" processing as the DOM is all nodes. I've stripped the irrelevant parts: procedure TfrmClicker.ParseQuestionXML(szXML : String); var respDoc: TDocument; xDataNodeList : TNodeList; // snip begin try // szXML := '<a><b><c><username>testuser</username></c></b></a>'; respDoc := getDOMfromXMLstring(szXML); xDataNodeList := respDoc.getElementsByTagName('Anonymous'); if xDataNodeList.Length > 0 then begin szAnonymousMode := xDataNodeList[0].firstChild.nodeValue; end; xDataNodeList := respDoc.getElementsByTagName('Kind'); if xDataNodeList.Length > 0 then begin szKind := xDataNodeList[0].firstChild.nodeValue; end; xDataNodeList := respDoc.getElementsByTagName('Title'); if xDataNodeList.Length > 0 then begin pnlMain.Caption := frmJoin123.ApplicationTitle + ': "' + xDataNodeList[0].firstChild.nodeValue + '"'; end; end; xDataNodeList := respDoc.getElementsByTagName('Body'); if xDataNodeList.Length > 0 then begin if xDataNodeList[0].firstChild <> nil then szContent := StripCodes(xDataNodeList[0].firstChild.nodeValue); end; xDataNodeList := respDoc.getElementsByTagName('EmptyBody'); // ensure there is no content Now, that shows how to parse the XML. My understanding is that RSS can be badly formed, or inconsistent, but that's for you to sort out... Also note that there is a new JSON RSS system that is being adopted. https://jsonfeed.org/version/1 -- Matthew Jones |
Wed, Oct 25 2017 12:07 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Thom,
<< Is it possible to display RSS feeds in EWB? >> Sure, this is the function that you want to use to get the XML into a TDocument instance that contains a DOM tree of nodes that you can use to navigate and display the various bits of information as you wish: https://www.elevatesoft.com/manual?action=viewtopic&id=ewb2&topic=ParseXML Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, June 12, 2024 at 01:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |