Select XMLElement() gives XML parsing failed error

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
LVL 1
leonstAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
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.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leonstAuthor Commented:
Thanks for your post.

I've asked around and it looks like there's a setup problem here...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.