your exception message does not give much detail so it is hard to know where things went wrong. See this thread:
as mentioned in that thread, use the debug runtime dll and make sure you have compiled all your code in debug mode. You should then be able to see exactly where your code is crashing.
I know a lot about StringTheory but very little about iQxml but will help if I can. Having said that, a while ago I did help Nikola get around a 4MB output string limit by replacing a CSTRING(4096000) with a SringTheory object - see near the end of this topic:
I would suggest using that version of iQxml (if you are not already) - it may or may not be related to your current problem but it could save you grief down the track. Again, make sure you compile it in debug mode.
and one final thing: where you have
st.base64NoWrap = True
st.Base64Encode()
change that to
st.Base64Encode(st:noWrap)
as (at least in vers 3.70 which is the current version) it looks as if the st.base64NoWrap property is not respected in this context. Looking back at earlier versions it was OK in 3.10 but a bug entered in 2019 in vers 3.11 when other options were introduced and it seems no-one has noticed until now!
hth and cheers
Geoff R
#Edit I just fixed that issue in st.Base64Encode() and have sent it off to Bruce for possible inclusion in a future version so if you are reading this some time in the future and have a version > 3.70 that last comment may no longer apply (but the suggested change will still work so best to change it now).