|
Post by turbov21 on Feb 17, 2008 21:00:58 GMT -5
What's wrong with this code? cls url$ = "http://kerovia.net:8008/seaside/go/runbasic?app=UploadList" print httpget$(url$)
If you go to that url, it's a raw XML file. When httpget$() requests the page, it gives me a full RBP page. Help! Is this a bug?
|
|
|
Post by wurlde on Feb 19, 2008 2:49:58 GMT -5
have you tried to compare the page sources? what I think it's that httpget$ "capture" what a server has to say when requesting a page, if server is RB, then you should have the same code string that when you request the page in a browser... but it's only a guess
|
|
|
Post by mikeukmid on Feb 19, 2008 6:51:26 GMT -5
Does the fact that the file is published as an app have any effect? To get the raw file, is it necessary to quote just the path to the file in the URL?
eg url$ = "http://kerovia.net:8008/uploads/filename.xml"
Just a thought as I don't know why you publish an xml file.
Mike.
EDIT: Having just tested what I said above, using RAW HTTPGET$(url$) returns just the XML (confirmed by viewing the source) Does that help?
|
|
|
Post by wurlde on Feb 19, 2008 8:03:02 GMT -5
Just a thought as I don't know why you publish an xml file. Sometimes it's used to exchange data among servers or apps
|
|
|
Post by mikeukmid on Feb 19, 2008 8:24:54 GMT -5
Yes I understand that, but in that case, would the xml file be downloaded by another server or app rather than be served up as a webpage? XML is relatively new to me - I only recently started to use it with Run BASIC xml parser to extract podcast links. The more I learn, the less I know! Mike. The more I learn, the less I know! - I shall make that into a signature.
|
|
|
Post by turbov21 on Feb 19, 2008 10:48:42 GMT -5
Try this code and see what I mean: [start] html "<b>http://kerovia.net:8008/seaside/go/runbasicpersonal?app=XmlRaw</b>" print "" : print "" print httpget$("http://kerovia.net:8008/seaside/go/runbasicpersonal?app=XmlRaw") link #link, "Next", [next] wait
[next] cls html "<b>url$ = kerovia.net:8008/seaside/go/runbasicpersonal?app=XmlRaw</b>" print "" : print "" url$ = "http://kerovia.net:8008/seaside/go/runbasicpersonal?app=XmlRaw" print httpget$(url$) link #link, "Next", [next2] wait
[next2] cls html "<b>http://kerovia.net:8008/XmlTest.xml</b>" print "" : print "" print httpget$("http://kerovia.net:8008/XmlTest.xml") link #link, "Start over", [start] wait It works when the XML is saved as a file, but I'd prefer to be able to pull the XML straight from a program, so I can manipulate the data per pull, as opposed to no knowing when the file was created last.
|
|
|
Post by mikeukmid on Feb 19, 2008 11:31:50 GMT -5
Yes Andrew, that is what I was saying, if the file is served up as a webpage (an app?), then RB will manipulate the file, whereas if the file is downloaded it is raw? Does that sound right? I have no idea whether your need can be met by RB.
The only possibility I can think of - enclose the XML in <PRE> tags and parse it out to rebuild the file. Would that work for you?
Carl, any comments please?
|
|
|
Post by turbov21 on Feb 19, 2008 12:15:52 GMT -5
Yes Andrew, that is what I was saying, if the file is served up as a webpage (an app?), then RB will manipulate the file, whereas if the file is downloaded it is raw? Does that sound right? I have no idea whether your need can be met by RB. RBP really should do what I need it to; that's what RAW is there to do, spit out non-HTML-page material. I know it'll work, because it does just that in a browser, there seems to be some problem in RBP serving files to itself. The only possibility I can think of - enclose the XML in <PRE> tags and parse it out to rebuild the file. Would that work for you? I might end up having to do that, but if that's the case, then RAW has failed to live up to its design. Carl, any comments please? Does this need to go in the Bug forum?
|
|
|
Post by carlgundel on Feb 19, 2008 13:06:37 GMT -5
Yes Andrew, that is what I was saying, if the file is served up as a webpage (an app?), then RB will manipulate the file, whereas if the file is downloaded it is raw? Does that sound right? I have no idea whether your need can be met by RB. The only possibility I can think of - enclose the XML in <PRE> tags and parse it out to rebuild the file. Would that work for you? Carl, any comments please? I haven't had a chance to test this out yet, sorry. -Carl
|
|
|
Post by carlgundel on Feb 19, 2008 20:43:30 GMT -5
Yes Andrew, that is what I was saying, if the file is served up as a webpage (an app?), then RB will manipulate the file, whereas if the file is downloaded it is raw? Does that sound right? I have no idea whether your need can be met by RB. The only possibility I can think of - enclose the XML in <PRE> tags and parse it out to rebuild the file. Would that work for you? Carl, any comments please? I haven't had a chance to test this out yet, sorry. -Carl Okay, now I've tried this out. Definitely a bug. Hopefully I'll be able to fix this without too much trouble. -Carl
|
|
|
Post by turbov21 on Feb 19, 2008 23:21:06 GMT -5
Okay, now I've tried this out. Definitely a bug. Hopefully I'll be able to fix this without too much trouble. -Carl Thanks, Carl!
|
|
|
Post by carlgundel on Feb 22, 2008 16:16:16 GMT -5
Okay, I seem to have a fix for this now.
-Carl
|
|
|
Post by turbov21 on Feb 22, 2008 16:30:28 GMT -5
Okay, I seem to have a fix for this now. -Carl Yaaay!
|
|