DiscussionsIssue archiveOCCT:Application Framework

Archived issue #0031340

Application Framework - LDOM fails to read XML file starting with BOM

Open CASCADEOCCT:Application Frameworkclosed8 public notes

Search issues

Description

If XML file has BOM (Byte Order Mark) in the beginning, LDOM_XmlReader fails to find any XML data inside it, and returns empty document. Sample file is attached

Steps to reproduce

In DRAW:

pload QAcommands
OCC983 Attachment 1 (XML)

current output:
Document not parsed

expected output:
Document parsed
   RootName = datadictionary
       AttributeName = version
       AttributeValue = 3.0
   ElementName = component
       AttributeName = name
       AttributeValue = Input data

Added test:
bugs fclasses bug31340

Public activity

8 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: mpv
Date: Wed Sep 2 13:53:07 2020 +0300

    0031340: LDOM fails to read XML file starting with BOM
    
    Added support of BOM (byte order mask) characters at the start of an XML stream or file and provided information about found BOM in LDOMParser.
02Commenter 2
Fixed with possibility to get BOM information from the LDOM parser. Please, review.
03Commenter 3
04Commenter 4
Reviewed.
05Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mpv
Date: Fri Sep 4 11:25:24 2020 +0300

    # fix for the VS !=141 compilation

06Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: mpv
Date: Fri Sep 4 15:36:43 2020 +0300

    # removed warnings of compilation for Android

07Commenter 1
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17319.18000000012 / 17284.370000000214 [+0.20%]
Products
Total CPU difference: 12059.670000000087 / 12007.590000000067 [+0.43%]
Windows-64-VC14:
OCCT
Total CPU difference: 18776.390625 / 18770.796875 [+0.03%]
Products
Total CPU difference: 13251.640625 / 13222.90625 [+0.22%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
08Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records