Announcement

Collapse
No announcement yet.

Special characters in Generated xml report

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Special characters in Generated xml report

    The following xml report is generated after file compare in Beyond compare 4.

    Code:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <bcreport created="20-Jun-2020 6:28:13 PM">
    <filecomparison created="20-Jun-2020 6:28:12 PM">
    <filename1>\\PC3\D\test1.bas</filename1>
    <filename2>\\PC3\D\test2.bas</filename2>
    <linecomp status="same">
    <text ltid="1" rtid="1">Attribute VB_Name = "test"</text>
    </linecomp>
    <linecomp status="same">
    <text ltid="2" rtid="2"> If Trim(RRRnum) &lt;> "" Then RRRnum = RRRnum &amp; "|"</text>
    </linecomp>
    <linecomp status="same">
    <text ltid="3" rtid="3">'tagsToReplace = "&nbsp;$&lt;BR>$&lt;B>$&lt;/B>"</text>
    </linecomp>
    <linecomp status="same">
    <text ltid="4" rtid="4">If Trim(RRRnum) &lt;> "" Then RRRnum = RRRnum &amp; "|"</text>
    </linecomp>
    <linecomp status="same">
    <text ltid="5" rtid="5">'to remove special chars like &AMP;-case sensitive</text>
    </linecomp>
    </filecomparison>
    </bcreport>

    While reading this xml in vb.net code first i got the error: "Reference to undeclared entity 'nbsp' ".

    I have added this in the xml file and the error solved.
    <!DOCTYPE doctypeName [<!ENTITY nbsp "&#160;">]>
    But now it gives this error: "Reference to undeclared entity 'AMP' " for "to remove special chars like &AMP;-case sensitive" line.

    In this '&AMP;' is the actual text written in the file.
    Adding entity in xml will also convert the text not generated by beyond compare into special character.

    How to differentiate the actual text into beyond compare converted special character text? How to solve this error?
Working...
X