Consultor Eletrônico



Kbase P100462: With 4GL SAX-PARSER not all the data is coming in
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   28/10/2008
Status: Verified

SYMPTOM(s):

With SAX-PARSER not all the data is coming in

When the data contains & only the remaining part is processed in the code

FACT(s) (Environment):

OpenEdge 10.x
Progress 9.1D

CAUSE:

The "characters" method in the parser does not accumulate the data coming in

FIX:

To retrieve all the data which is coming from an XML element containing & or other special characters the "characters" method of your parser must accumulate the data into a variable.
Example:
procedure characters:
DEFINE INPUT PARAMETER pmCharArray AS MEMPTR NO-UNDO.
DEFINE INPUT PARAMETER piArrayLength AS INTEGER NO-UNDO.
ctmp = ctmp + GET-STRING( pmCharArray, 1, GET-SIZE( pmCharArray ) ). */
end procedure.
ctmp variable should be initialized to blank ( i.e. "" ) in startElement internal procedure.