Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7861057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:32:48+00:00 2026-06-02T22:32:48+00:00

I receive: ORA-31011: XML parsing failed ORA-19202: Error occurred in XML processing LPX-00230: invalid

  • 0

I receive:

  • ORA-31011: XML parsing failed
  • ORA-19202: Error occurred in XML processing
  • LPX-00230: invalid character 0 (U+0000) found in a Name or Nmtoken
  • Error at line 2
  • ORA-06512: at “SYS.XMLTYPE”, line 254
  • ORA-06512: at line 1

When attempting to execute:

select extractValue(
  XMLType(
    replace(myxmlcolumn,CHR(0),''
    )
  ), '/xpath/to/data'
)
foo,bar,foobar
from sch.tab 

WHERE cond='cond'

“myxmlcolumn” is of course a CLOB datatype, but contains XML. This error would make sense if I wasn’t doing the replace() on the NULL. That and the error is intermittent (possibly do to the matching of my clauses). How would a null be reported when it should have been replaced before the XML cast?

10g Enterprise Edition Release 10.2.0.5.0, Toad for Oracle pro 10.6.1.3

edit:
– also tried replacing with ‘H’ to prove it wasn’t inserting a NULL back in (same error)
– also tried replace(myxmlcolumn,’\n’,” in case it didn’t like the chr(0) (same error)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:32:52+00:00Added an answer on June 2, 2026 at 10:32 pm

    This is not an elegant solution, and I feel a bit dirty. From @jonearles answer it looks like a known bug. The simple solution is to NOT even attempt to cast to XML. Hopefully none of the advanced xpath was needed, in my case it was not.

    Select dbms_lob.substr(myxmlcolumn, 10, dbms_lob.instr(myxmlcolumn,'<data>') + 6)  
    

    “data” was the element I was after, and it happens to always hold a value that is 10 long, and is the first and only occurrence of the element so… I got lucky.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MERGE statement that's giving me the dreaded ORA-00904: invalid identifier error
I receive this error: java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or
I receive a daily XML file that contains thousands of records, each being a
I receive the following error when trying to run my ASP.NET MVC application: The
I receive the error below when running the following function. The catch says the
If I want to receive a one character input in C, how would I
I use Oracle 11g. A few days ago I encountered an ORA-12514 error. I
I receive a dictionary as input, and would like to to return a dictionary
I receive a string from a database query, then I remove all HTML tags,
We receive lots of data as flat files: delimitted or just fixed length records.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.