• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1125
  • Last Modified:

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
0
leonst
Asked:
leonst
1 Solution
 
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
 
leonstAuthor Commented:
Thanks for your post.

I've asked around and it looks like there's a setup problem here...
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now