Oracle XMLSerialize throws "Expected ')'" error. What's the best substitute to get around it? #6704
-
|
I'm using sqlglot to try and grab columns from several Oracle SQL files. Unfortunately in many of them, XMLSerialize keeps causing "Expected ')'" errors, preventing me from reading columns. Most of the XMLSerialize sections are dozens to hundreds of lines long, but I found a shorter example snippet that throws the error: select XMLSERIALIZE( DOCUMENT XMLELEMENT("FeatureCollection", XMLATTRIBUTES("http://localhost:2345/custom" as "xmlns:custom"), XMLAGG( XMLDOCS.XMLDOC ) ) ) as XMLDOC from ... sqlglot throws an error right after "DOCUMENT". Trouble is the error doesn't always show up right after "DOCUMENT" for them, but they all throw the same "Expected ')'" error somewhere in their code blobs. Since I really just need the columns, and XMLSerialize isn't exactly a column from a table, is there an appropriate XML object I could substitute it with to get what I need that wouldn't upset sqlglot? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @mpersonable, This appears to be unsupported right now. It's low priority for the core team to add it, but we're happy to accept a well-documented & tested PR if you want to take a stab at it. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi @mpersonable,
This appears to be unsupported right now. It's low priority for the core team to add it, but we're happy to accept a well-documented & tested PR if you want to take a stab at it.
Thanks.