I have an extremely simple script which should display the contents of a web page. The web page is returned from the google weather api and as far as I can see is a lot larger in content than shown by my script.
Here is the script
on mouseUp
local tURL, tTree
put "http://google.co.uk/ig/api?weather=dl56up" into tURL
put revCreateXMLTree(tURL,false,true,false) into tTree
put revXMLText(tTree, ,false) into field "ListXML"
revDeleteXMLTree tTree
end mouseUp
first I create a URL and then a tree using the URL as an argument. My attempts to display the contents result in only the first line of the XML being shown;
<?xml version="1.0"?>
I have entered the URL into a web browser to make sure things are ok, which they are.
Anyone have an idea why I do not see more of the XML stream in my field?
Regards
Jeff
displaying xml in a field - solved
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
displaying xml in a field - solved
Last edited by jeffInt on Mon Jun 22, 2009 1:59 pm, edited 1 time in total.
Chat with other RunRev developers, pop over to www.bjoernke.com/runrev/chatrev.php
Hi, the problem is that you parse the string that contains the URL, not the contents of the URL. This should work:
on mouseUp
local tURL, tTree,tXML
put "http://google.co.uk/ig/api?weather=dl56up" into tURL
put URL tURL into tXML
put revCreateXMLTree(tXML,true,true,false) into tTree
put revXMLText(tTree, ,false) into field "ListXML"
revDeleteXMLTree tTree
end mouseUp
cheers,
Malte
on mouseUp
local tURL, tTree,tXML
put "http://google.co.uk/ig/api?weather=dl56up" into tURL
put URL tURL into tXML
put revCreateXMLTree(tXML,true,true,false) into tTree
put revXMLText(tTree, ,false) into field "ListXML"
revDeleteXMLTree tTree
end mouseUp
cheers,
Malte
Fantastic - partly. When I debug I can now see in variable tXML a long string of text from the web page. Unfortunately the script still only shows the first lin of this string. I have checked that the field allows wrapping.
I am impressed with your knowledge, this doesn't look like something I've seen in the documentation.
Jeff
I am impressed with your knowledge, this doesn't look like something I've seen in the documentation.
Jeff
Chat with other RunRev developers, pop over to www.bjoernke.com/runrev/chatrev.php