Search found 658 matches

by Scott Klement
Wed Dec 07, 2022 2:09 am
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

Please use [code] and [/code] around your code. You have been providing {code} and {/code} instead, and as you can see if you read your messages after you post them, this doesn't work. The path= option in the 2nd parameter to %XML is not for the file path. It is just the path of elements to extract ...
by Scott Klement
Mon Dec 05, 2022 9:34 pm
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

but... XML-INTO can read the file from the IFS for you, you dont' need to read it manually.

Go back to the example I posted earlier and see how it works. viewtopic.php?p=994#p994
by Scott Klement
Mon Dec 05, 2022 5:52 pm
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

open(), read(), write(), close() are UNIX APIs.
fopen(), fgets(), fputs(), fread(), fwrite(), fclose(), etc are ANSI C APIs.

Not sure which one is newer -- both date back to at least the 1970's.

I don't understand why you need to use any of these.... just let XML-INTO read the file.
by Scott Klement
Mon Dec 05, 2022 2:53 am
Forum: HTTPAPI
Topic: FOPEN(
Replies: 12
Views: 11504

Re: FOPEN(

Well, he's probably calling open(), but just to confuse us, has renamed it to fopen().... so the O_TRUNC is the likely culprit.

It'd be nice if he'd come on here and tell us that so we don't have to guess.
by Scott Klement
Sun Dec 04, 2022 9:26 am
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

Sorry, I don't understand why you are searching for <Result> and substringing off all of the XML before it. Use the "path" option on xml-into so that this isn't necessary -- see the example I posted earlier. I already showed you how to make the whole thing work. I don't understand what you...
by Scott Klement
Sun Dec 04, 2022 1:56 am
Forum: HTTPAPI
Topic: FOPEN(
Replies: 12
Views: 11504

Re: FOPEN(

Well, if he were calling the open() API, yes. O_TRUNC makes no sense in the context of fopen()
by Scott Klement
Sat Dec 03, 2022 12:46 am
Forum: HTTPAPI
Topic: FOPEN(
Replies: 12
Views: 11504

Re: FOPEN(

This code makes no sense. You are writing the code as if you are calling the open() and read() APIs -- but your code says fopen and fread which are different APIs with different parameters.

Also, you posted this in the HTTPAPI forum, and it doesn't appear to be related at all to HTTPAPI.
by Scott Klement
Sat Dec 03, 2022 12:43 am
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

When you post code, please put [code] before the first line of the snippet, and [/code] after it. This time around you posted a lot of code with very few explanations, and it is very hard to read. Sorry, I don't have time right now to go through and reformat the messages for you, like I did earlier....
by Scott Klement
Thu Dec 01, 2022 11:09 pm
Forum: RPG IV
Topic: XML-INTO XML parser detected error code 2.
Replies: 19
Views: 20298

Re: XML-INTO XML parser detected error code 2.

I added the code tags because it was hard to read... Maybe that fixed the XML formatting problem, too.
by Scott Klement
Thu Dec 01, 2022 7:28 pm
Forum: YAJL-ILE
Topic: How to set response headers
Replies: 6
Views: 2120

Re: How to set response headers

yajl_writeStdout is pretty simplistic -- and doesn't have code to allow you to customize the headers. I could consider adding that if enough people are interested -- but you are the first one that's ever asked for it. You could, of course, use yajl_copyBufStr() or similar to get the JSON data into y...