1 Reply Latest reply: Oct 23, 2009 11:17 AM by Jason_(A_Non) RSS

    XML Parsing Error

    Stephen
      Hello,

      Getting the following error :

      ORA-31011: XML parsing failed
      ORA-19202: Error occurred in XML processing
      LPX-00217: invalid character 0 (U+0000)
      Error at line 1-31011



      I have an xml data in a clob and looks like one of the tag has a invalid character due to which the parsing fails. Anyway to get around this issue?

      example

      DECLARE

      l_clob CLOB;
      l_xml XMLTYPE;
      BEGIN

      l_clob := ' <tag>
      <tag1>32434234</tag1>
      <tag2>junk character</tag2>
      </tag>'

      l_xml := XMLTYPE(l_clob);

      END;


      The value has is being populated into the tag1 and tag2 are coming from a oracle type that comes from a different service altogether.

      Thanks,
      VJ
        • 1. Re: XML Parsing Error
          Jason_(A_Non)
          What are you wanting to do? Do you want to remove the offending character(s) before converting to an XMLType or are you wanting to have the character become part of the XMLType message?

          The first can be solved by a REPLACE. The second involves character sets in both systems and making sure the receiving system's character is a superset or the same as the send system character set.