Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DBMS_XMLGEN.GETXML returning invalid xml

810568Nov 4 2010 — edited Nov 5 2010
Hi folks,

SELECT
xmltype( DBMS_XMLGEN.GETXML('SELECT * FROM all_views /*where view_name = ''DICT_COLUMNS''*/ ')) AS xml
FROM
dual

the sql above does not encode correctly. Tried DBMS_XMLGEN.CONVERT but this garbles the xml tags also.
The solution (if any) should work as SQL (not PL/SQL). Please help.

Regards, Peter

ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00231: invalid character 62 ('>') found in a Name or Nmtoken
Error at line 39
ORA-06512: at "SYS.XMLTYPE", line 254
ORA-06512: at line 1
31011. 00000 - "XML parsing failed"
*Cause: XML parser returned an error while trying to parse the document.
*Action: Check if the document to be parsed is valid.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2010
Added on Nov 4 2010
19 comments
2,299 views