Page 1 of 1

read XML

Posted: Tue Aug 11, 2015 10:43 am
by link76
I would like to read all the nodes "​​title", present in the xml file,

Code: Select all

local list_title

on mouseUp
   get url "http://www.ansa.it/sito/notizie/cronaca/cronaca_rss.xml" 
   put revCreateXMLTree( it, true, true, false) into tRSS_ANSA
   
   repeat .....
      put revXMLNodeContents(tRSS_ANSA, "rss/channel/item/title") & return after list_title
   end repeat

   put list_title
   
end mouseUp
thanks

Re: read XML

Posted: Wed Aug 12, 2015 7:48 pm
by zaxos
According to the link you provided:

Code: Select all

   put the URL "http://www.ansa.it/sito/notizie/cronaca/cronaca_rss.xml" into tURL
   put revCreateXMLTree(tURL, false, true, false) into tTree 
   put revXMLChildNames(pTree, "rss/channel", return, "item", true) into tItems
   repeat for each line tLine in tItems
      put revXMLNodeContents(pTree, ("rss/channel/" & tLine & "/title") )&return after tTitles
   end repeat
put tTitles
I tested this and it worked, if you still cant figure it out i can send you the full code.