XML : The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section

  1. I have xml from url.  2. xml structure is like this.          <?xml version="1.0" encoding="utf-8"?><xml><root>  <row>  <company><![CDATA[  ]]></company>  <id>10331</id>  <account></account>  <terms> </terms>  <level>standard</level>  <location><![CDATA[  ]]></location>  <booth></booth>  <contractor></contractor>  <address>  <country></country>  <street><![CDATA[  ]]></street>  <city></city>  <state></state>  <zip></zip>  </address>  <description><![CDATA[  ]]></description>  </row>  <row>  <company><![CDATA[  ]]></company>  <id>9644</id>  <account></account>  <terms> </terms>  <level>standard</level>  <location><![CDATA[  ]]></location>  <booth></booth>  <contractor></contractor>  <address>  <country></country>  <street><![CDATA[  ]]></street>  <city></city>  <state></state>  <zip></zip>  </address>  <description><![CDATA[  ]]></description>  </row>  <row>  <company><![CDATA[  ]]></company>  <id>9650</id>  <account></account>  <terms> </terms>  <level>standard</level>  <location><![CDATA[  ]]></location>  <booth></booth>  <contractor></contractor>  <address>  <country></country>  <street><![CDATA[  ]]></street>  <city></city>  <state></state>  <zip></zip>  </address>  <description><![CDATA[  ]]></description>  </row>  <row>  <company><![CDATA[ 3-CI ]]></company>  <id>780</id>  <account>001F000000qM0KkIAK</account>  <terms> </terms>  <level>standard</level>  <location><![CDATA[ Hall F ]]></location>  <booth>8215</booth>  <contractor>Goodkey</contractor>  <url><![CDATA[ http://www.3ci.com ]]></url>  <address>  <country>Canada</country>  <street><![CDATA[ 18, 5555 51st Ave SE ]]></street>  <city>Calgary</city>  <state>Alberta</state>  <zip>T2C 3X4</zip>  </address>  <phone>(403) 250-2271 X102</phone>  <email>colin@3-ci.com</email>  <description><![CDATA[ 3CI is an Overmold Connectivity Solutions Provider for signal cables, power cables, harnesses and custom solutions for industry.    Manufactured in Canada , we are a privately held ISO 9001:2008 accredited company with over 15 years experience in Oil and Gas, Military, Shipboard, Transit/Heavy Equipment, Light Rail ,Mining, Sanding and Salting machinery.    The concept is to solve environmental issues in the wire and cable industry. The opportunity is to reduce overhead costs and increase product reliability. The potential is to eliminate failure and reduce overall cost in any application.    &nbsp;    With our own fully machined and staffed machine shop we are able to add value to all our customer's needs by way of the ability to create molds in house , and components used in our manufacturing , not to mention full on machining capability providing a complete manufacturing solution for over-molded wire and cable , parts , panels and much much more. ]]></description>  </row>  <row>  <company><![CDATA[ 3M ]]></company>  <id>4090</id>  <account></account>  <terms> </terms>  <level>standard</level>  <location><![CDATA[  ]]></location>  <booth></booth>  <contractor></contractor>  <url><![CDATA[ http://www.3mcanada.ca/3M/en_CA/country-ca/ ]]></url>  <address>  <country></country>  <street><![CDATA[  ]]></street>  <city></city>  <state></state>  <zip></zip>  </address>  <phone></phone>  <email></email>  <description><![CDATA[  ]]></description>  </row>  <row>  <company><![CDATA[ 3M Canada Company ]]></company>  <id>782</id>  <account>001F000000qLn9lIAC</account>  <terms><term><![CDATA[Abrasion and Corrosion Control]]></term><term><![CDATA[Filters - Air, Gas and Liquids]]></term><term><![CDATA[Fire Protection - Equipment and Services]]></term><term><![CDATA[Health and Safety - Equipment and Systems]]></term><term><![CDATA[Health and Safety - Fall Protection]]></term><term><![CDATA[Filters]]></term><term><![CDATA[Fire Protection]]></term><term><![CDATA[Health and Safety]]></term> </terms>  <level>standard</level>  <location><![CDATA[ Halls A, B, C ]]></location>  <booth>1110</booth>  <contractor>Goodkey</contractor>  <url><![CDATA[ http://www.3m.ca/oilandgas ]]></url>  <address>  <country>Canada</country>  <street><![CDATA[ 1001 53RD AVE N.E. ]]></street>  <city>Calgary </city>  <state>Alberta </state>  <zip>T2E 7K4</zip>  </address>  <phone>780-235-8283</phone>  <email>jboychuk@mmm.com</email>  <description><![CDATA[ 3M supplies thousands of products to the global Oil and Gas Industry and its applications. From everyday essentials – such as respirators, abrasives and electrical connectors – to advanced materials for preventing corrosion and reducing the density of down hole cements, 3M technologies offer you a wealth of ingenious solutions to many of today's toughest challenges. ]]></description>  </row>........................................    
  1. When i am reading it from url it is giving me exception like during parsing because data is missing inside cdata.

    [Fatal Error] exhibitors-feed123.xml:18125:5: The character sequence "]]>" must not appear in content unless used to mark the end of a CDATA section.

    1416 001F000000qM0y3IAC standard 7752 Goodkey

              <url><![CDATA[ http://www.kaeser.com ]]></url>                      <address>              <country>Canada</country>              <street><![CDATA[ 3760 rue La Verendrye ]]></street>              <city>Boisbriand</city>              <state>Quebec</state>              <zip>J7H 1H5</zip>          </address>                <phone>(450) 971-1414</phone>                <email>christine.shipley@kaeser.com</email>                      <description><![CDATA[  ]]></description>      </row>           <row>          <company><![CDATA[ Kaizen Institute Canada ]]></company>          <id>3694</id>          <account>001F0000014MuChIAK</account>                  <terms><term><![CDATA[Consultants]]></term><term><![CDATA[Consultants - Other]]></term>            </terms>          <level>standard</level>          <location><![CDATA[ Corral ]]></location>          <booth>2222</booth>           <contractor>Superior</contractor>             <url><![CDATA[ http://ca.kaizen.com ]]></url>                      <address>              <country>Canada</country>              <street><![CDATA[ 207 5720 Macleod Trail SW ]]></street>              <city>Calgary</city>              <state>Alberta</state>              <zip>T2H 0J6</zip>          </address>                <phone>(403) 452-1795</phone>                <email>ccherry@kaizen.com</email>                      <description>as industry at the Heavy Oil Theater!    

    ]]>

No comments:

Post a Comment