Hi,
so far I have used iqxml and considering the limit of 4mb I need advice on which tool to take and which will replace it the easiest and there are no such limitations.
Of course, it would be great if it supports a similar structure, so I don’t have to change much.
String & Cstrings have a max size of 4MB, so if iqXML is using a Cstring, then creating a larger Cstring using NEW(Cstring(StringSize)) becomes an option if you can edit the iqXML source.
CS &CSTRING
StringSize LONG
CODE
StringSize = 0FFFFFFh !16MB
CS &= NEW CSTRING(stringSize)
The problem is, you need to know what the StringSize needs to be first, which you can get by looking at the file size as a rough guide.
Hi,
I use XML:AddStringText because I need to encode more then one pdf on xml.
Liimitation described in documentation:
If writing to string (XML:CreateXMLString) and the 2nd parameter is False, the maximum string length is 4MB
No metter if I use CS &CSTRING ,and I use it , it write only on 4mb and then stop.
I have not used IQXML (like others I have used Capesoft’s XFiles for XML) however it would require a rewrite of all your code to change to some other product.
However IQXML is open source (released under MIT license) and available at :
so there is absolutely nothing stopping you from altering its code to meet your requirements.
if you look at XML:AddStringText:
XML:AddStringText PROCEDURE (Instr,<FixUp>) ! Declare Procedure
CODE ! Begin processed code
if mod:XMLStringInUse = 2
if FixUp = True
OutWriteString = OutWriteString & XML:ConvertToXML(InStr) & Mod:Interm
elsif FixUp = 2
OutWriteString = OutWriteString & InStr
else
OutWriteString = OutWriteString & InStr & Mod:Interm
end
else
if FixUp = True
TXT:STANDLINE = XML:ConvertToXML(Instr)
end
txt:standline = InStr
xmll:AddToLastString(True)
end
you will see OutWriteString which is defined in the data pad as:
OutWriteString CSTRING(4096000),THREAD,AUTO
so this is where the limit us coming in.
Rather than use a string of a set arbitrary size, I personally would use StringTheory instead (doing an st.append with ST is much more efficient and is limited only by available memory). But of course you could use SystemStringClass or DynaStringClass or write your own code to make the OutWriteString bigger as both Richard and Jeff have indicated (which is probably the easiest minimal approach requiring least effort).
No matter how you go about removing the 4MB limit, once done you could (if you want to) fork the product and publish the “new improved” version.
Just to let you know Nikola that out of interest I made those changes to get around the 4MB OutWriteString limit. It required about 50 or so changes to the code where OutWriteString was used. I replaced it with OutWriteST which is a StringTheory object.
I have not tested it at all as (as I mentioned before) I have never used IQXML. But if you use ST and would like to try this to see if it solves your problem then let me know and I will send it to you. The zipped app is about 250k.
Alternatively you could instead change your code to use one of the third party products that is supported (as Nardus mentioned he did a few years back).
great - glad it worked ok for you. As a bonus, it should also run a bit quicker.
since Nikola found it worked OK for him and solved his 4MB problem, I have decided to post it here just in case anyone else still uses the product and has the same problem in the future. The procedures changed were: