Skip to content

Oracle SQL XMLSERIALIZE syntax not supported #1564

Closed

Description

@xiongtx

Oracle's XMLSERIALIZE differs from the parser's expectations in that it has a CONTENT keyword. The following example doesn't parse:

SELECT XMLSERIALIZE(CONTENT XMLTYPE('<Owner>Grandco</Owner>')) AS xmlserialize_doc
   FROM DUAL;
2. Unhandled net.sf.jsqlparser.JSQLParserException

1. Caused by net.sf.jsqlparser.parser.ParseException
   Encountered unexpected token: "XMLSERIALIZE" "XMLSERIALIZE" at line 1,
   column 8.
   
   Was expecting one of:
   
       "!"  "(" "*" "NOT" "STRAIGHT_JOIN"

Activity

  1. manticore-projects commented on Jun 12, 2022

    @manticore-projects
    Contributor

    Greetings,

    thank you for reporting, I will see what I can do about.

  2. wumpz commented on Jun 28, 2022

    @wumpz
    Member

    Only a special expression of XMLSERIALIZE is supported at the moment

    SELECT xmlserialize(xmlagg(xmltext(COMMENT_LINE) ORDER BY COMMENT_SEQUENCE) AS varchar (1024)) FROM mytable GROUP BY COMMENT_NUMBER
  3. wumpz commented on Jun 28, 2022

    @wumpz
    Member

    JSqlParserCC.jjt line 4675

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions