0 Replies Latest reply: Nov 22, 2011 6:56 AM by 901554 RSS

    Issue with storing a large xml having CDATA in CLOB data type Oracle DB

    901554
      Hi,
      I am facing an issue after I store a XML in Clob data type through Java JDBC thin driver connection.
      I have a requirement to save a xml which contains CDATA in it. This stored xml needs to be accessed by another layer and it will wrap the entire contents on current xml into another CDATA. Now since CDATA cannot be nested, I am storing the original xml in the below format:

      <paramGroup name="BgpPeer">
                               <groupMember index="1">
                                    <param name="localAS" value="62914"/>
                                    <param name="peerIpAddress" value="172.29.4.6"/>
                                    <param name="peerASNeighbor" value="55012"/>
                                    <param name="ipVersion" value="4"/>
                                    <param name="redistribute" value="connected"/>
                                    <param name="asOverride" value="TRUE"/>
                                    <param name="bgpVersionNeighbor" value="4"/>
                                    <param name="maximumPrefix" value="1000"/>
                                    <param name="vrfName" value="nk_77311_Short_Name"/>
                                    <param name="extensions">&lt;![CDATA[<extensions>
                                              <vendor_extensions>
                                                   <ve_cisco_activatePeeringNeighbor>yes</ve_cisco_activatePeeringNeighbor>
                                              </vendor_extensions>
                                         </extensions>
                                    ]]&gt;</param>
                                    <param name="doNotActivate" value="false"/>
                               </groupMember>
                          </paramGroup>

      The issue I am facing is that this xml gets stored in database which looks like:


                          
                          <paramGroup name="BgpPeer">
                               <groupMember index="1">
                                    <param name="localAS" value="62914"/>
                                    <param name="peerIpAddress" value="172.29.4.6"/>
                                    <param name="peerASNeighbor" value="55012"/>
                                    <param name="ipVersion" value="4"/>
                                    <param name="redistribute" value="connected"/>
                                    <param name="asOverride" value="TRUE"/>
                                    <param name="bgpVersionNeighbor" value="4"/>
                                    <param name="maximumPrefix" value="1000"/>
                                    <param name="vrfName" value="nk_77311_Short_Name"/>
                                    <param name="extensions">&lt;![CDATA[]]&gt;
                                         <extensions>
                                              <vendor_extensions>
                                                   <ve_cisco_activatePeeringNeighbor>yes</ve_cisco_activatePeeringNeighbor>
                                              </vendor_extensions>
                                         </extensions>
                                    </param>
                                    <param name="doNotActivate" value="false"/>
                               </groupMember>
                          </paramGroup>

      Please suggest the cause for this discrepancy. Thanks in Advance!

      Edited by: 898551 on Nov 22, 2011 4:52 AM

      Edited by: 898551 on Nov 22, 2011 4:55 AM