We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

Select XMLElement() gives XML parsing failed error

leonst
leonst asked
on
Medium Priority
1,150 Views
Last Modified: 2012-06-21
Hi,

I'm looking at using some XML reports, e.g. to return the rows in XML.

I've found references to XMLElement() which should enclose the data in tags, but I always get the error "ORA-31011: XML parsing failed".

E.g. one simple example I've seen on the web is using sysdate, but this doesn't work for me:

SQL> SELECT XMLELEMENT("date", sysdate) FROM dual;
ERROR:
ORA-31011: XML parsing failed

Am I doing something wrong? Using Oracle 10g in a 9.2 SQL*Plus window.

Thanks in advance,

Leon
Comment
Watch Question

Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009
Commented:
it works fine for me (Oracle 9.2.0.4).

I found a metalink note that suggests to apply at least server patch 9.2.0.4
:


Bug 2560740  XML Parser throws incorrect error on UTF8 database
 This note gives a brief overview of bug 2560740.
Affects:

    Product (Component)    Oracle XML Developers Kit (XML Developer's Kit for C)
    Range of versions believed to be affected    Versions < 10G
    Versions confirmed as being affected    

        * 9.2.0.3

    Platforms affected    Generic (all / most platforms affected)

Fixed:

    This issue is fixed in    

        * 9.2.0.4 (Server Patch Set)
        * XDK Patch 9.2.0.6
        * 10G Production Base Release

Symptoms:

    * Error may occur
    * ORA-31011

Related To:

    * XDK

Description

    XML Parser throws incorrect error on UTF8 database
    (ORA-31011)

The full bug text (if published) can be seen at Bug 2560740
This link will not work for UNPUBLISHED bugs.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Thanks for your post.

I've asked around and it looks like there's a setup problem here...
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.