1
Vote

Error loading xml

description

An error is thrown when using DBSelectQuery.ReadXml, from a previously generated xml.

Error occurs when xml that is loading has aggregated operations, like multile where clauses with bool-op.

Things like:
<where>
  <bool-op op="And">
    <left>
      <bool-op op="And">
        <left>
          <compare op="Equals">
            <left>
              <field table="Table1" name="Field1" />
            </left>
            <right>
              <field table="Table1" name="Field1" />
            </right>
          </compare>
        </left>
        <right>
          <compare op="NotEqual">
            <left>
              <field table="Table2" name="Field2" />
            </left>
            <right>
              <field table="Table3" name="Field3" />
            </right>
          </compare>
        </right>
      </bool-op>
    </left>
    <right>
      <between op="Between">
        <compare>
          <field table="Table4" name="Field4" />
        </compare>
        <min>
          <const db-type="String" is-null="False">
            <value type-code="String">a</value>
          </const>
        </min>
        <max>
          <const db-type="String" is-null="False">
            <value type-code="String">b</value>
          </const>
        </max>
      </between>
    </right>
  </bool-op>
</where>
Issue is in method ReadXml. When the first bool-op is closed, the second is closed also. Must validade if it wasn't previously closed.

comments