XML-INTO and Max file size.

Discussions relating to writing software in ILE RPG (RPG IV). This includes both fixed and free format RPG.
Post Reply
bozeyed_joe
Posts: 3
Joined: Thu Mar 16, 2023 3:11 pm

XML-INTO and Max file size.

Post by bozeyed_joe »

Hi Scott,

I am using XML-INTO to pull in a product listing from one of our suppliers.
This file is 34Mb in size and has 15.5k products in it.

When I get to the XML-INTO command I get an error from the parser RNX0351:
The XML parser detected error code 300.
offset 0.

My initial thought is that it cannot see the end of the document due to the size, therefore cannot determine if all the end tags are present.
I have tried using a %handler reducing the number of elements to be brought in and get the same response.

Have you come across this before?

Many thanks
Mick
Scott Klement
Site Admin
Posts: 872
Joined: Sun Jul 04, 2021 5:12 am

Re: XML-INTO and Max file size.

Post by Scott Klement »

I've not seen this problem before, except when there was a problem with the actual XML file.

You have provided very little information. Have you checked the XML to ensure that it is well-formed? How did you do that? Are you reading the XML yourself, or loading it from a stream file? Have you verified the CCSID of the file matches its contents?
jclark
Posts: 1
Joined: Thu Sep 19, 2024 2:08 pm

Re: XML-INTO and Max file size.

Post by jclark »

I have recently run into the same error on a file. We get multiple files each day from the same source to process and ran into the issue only on 1 file and can't figure out what is wrong with it. RNX0351 The XML parser detected error code 300, which on the error code list says "300 The parser reached the end of the document before the document was complete". I've been searching through the xml and anything I can think of to figure what the issue is with this file and can't find anything. I've run through xml validation without issue. I've compared to the other files we get.
peder udesen
Posts: 22
Joined: Thu Jul 29, 2021 8:00 am

Re: XML-INTO and Max file size.

Post by peder udesen »

What CCSID does the file have?
And what format does it have ( Ascii, UTF-8, UTF16be ... )

If it is an UTF format then it could be the byte order markers that causes the problems.
I have experienced this before
Try to open it in Notepad++ There you can see the format.

Regards
Peder
Post Reply