开发者

log4net: Logging XML as string

开发者 https://www.devze.com 2023-03-01 02:05 出处:网络
I am experiencing a strange problem when I log the XML contents to the database. I have a table in Oracle 9i which has a CLOB column. I am logging the contents of my input XML to this column. When I l

I am experiencing a strange problem when I log the XML contents to the database. I have a table in Oracle 9i which has a CLOB column. I am logging the contents of my input XML to this column. When I log XML, additional characters are getting logged to the column.

This is my source XML file:

<Root BatchUploadType="Contract">
  <VOContractBatch>
    <Reference>Xavier Leasing Company</Reference>
    <Originator>Data Migrator</Originator>
    <ContractPackages>
      <VOContractPackagesCollection>
        <VOContractPackage>
          <Contract>
            <Customer Name="Omega Paper Products" Id="100901"/>
          </Contract>
        </VOContractPackage>
      </VOContractPackagesCollecti开发者_开发技巧on>
    </ContractPackages>
  </VOContractBatch>
</Root>

When I log this to the DB, I am getting an output that looks like this.

log4net: Logging XML as string

I am reading the XML from a file. The encoding of this file is set to ANSI. Where should I be looking?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号