Kbase P177800: Getting error 9324 when using the SAX parser to extract more than 32K of data from an XML element
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/22/2010 |
|
Status: Unverified
SYMPTOM(s):
Getting error 9324 when using the SAX parser to extract more than 32K of data from an XML element
Attempt to exceed maximum size of a CHARACTER variable. (9324)
The CHARACTERS callback procedure of the SAX parser is using a MEMPTR to extract the XML element content
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
The GET-STRING() method which is used to extract the data from the MEMPTR variable has a 32K data limit.
FIX:
Replace the MEMPTR input parameter of the CHARACTERS callback procedure by a LONGCHAR input parameter, for example:
Replace the following ...
PROCEDURE Characters:
DEFINE INPUT PARAMETER charData AS MEMPTR.
DEFINE INPUT PARAMETER numChars AS INTEGER.
elementData = elementData + GET-STRING(charData, 1, GET-SIZE(charData)).
END.
... by:
PROCEDURE Characters:
DEFINE INPUT PARAMETER charData AS LONGCHAR.
DEFINE INPUT PARAMETER numChars AS INTEGER.
elementData = elementData + charData.
END.