Skip to content

XML Writer Codeunit - Error while CDATA exist in the XML FIle #281

@ELCI-PRR

Description

@ELCI-PRR

Hi

Today i have an error when i have html encoding into an xml ( wrong practice i know) , but the customer of my customer send us an XML with this value :

I patch this problem on an old customer by modifying the code like this:

LOCAL ReadAndInsertXmlElement(VAR XMLBuffer : Record "XML Buffer";ParentXMLBuffer : Record "XML Buffer";VAR ElementNumber : Integer;VAR InsertedXMLBufferElement : Record "XML Buffer";VAR ProcessingInstructionNumber : Integer)
XmlNodeType := XmlReader.NodeType;
IF XmlNodeType.Equals(XmlNodeType.Element) THEN BEGIN
//PRR 13/11/2024
//BEFORE
IF XmlNodeType.Equals(XmlNodeType.Element) THEN BEGIN
//AFTER
IF (XmlNodeType.Equals(XmlNodeType.Element)) OR (XmlNodeType.Equals(XmlNodeType.CDATA)) THEN BEGIN
//FIN PRR 13/11/2024
ElementNumber += 1;
ProcessXmlElement(XMLBuffer,ParentXMLBuffer,ElementNumber,InsertedXMLBufferElement)
END ELSE
...

Do you think it's possible to update the base app to have this patch ?

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions