cancel
Showing results for 
Search instead for 
Did you mean: 

XMLTABLE function in HANA not working for some XMLs

NitinMahajan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

I have an XML, which XMLTABLE function is not able to parse, even with using XMLNAMESPACE.

<form xmlns:sr=http://abc.org/abc/xml/screen-runner sr:data-format-version=4.0.0>
            <section-1>
                        <control-1>
                                    Office
                        </control-1>
                        <control-2>
                                    Home
                        </control-2>
            </section-1>
            <section-2>
                        <control-3>
                                    hello
                        </control-3>
                        <control-4>
                                    world
                        </control-4>
            </section-2>
</form>
NitinMahajan
Product and Topic Expert
Product and Topic Expert
0 Kudos

However if I change the first node as:

<form xmlns:sr="http://abc.org/abc/xml/screen-runner">

it works.

Can anyone suggest, why is that?

NitinMahajan
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Lars,

Thanks for looking into this.

However, the quotes also don't work. Anything beyond the namespace (i.e. if a property like data-format-version is defined) ,doesn't work.

Below is what I tried.

<form xmlns:sr="http://abc.org/abc/xml/screen-runner" sr:data-format-version="4.0.0">

However, like I mentioned, removing the property data-format-version, makes it work.

Regards,

Nitin

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor

While I'm no XML expert, I am under the impression that the tag "form" without the quotation marks around the attribute values is malformed XML.

Valid XML encloses the attribute values in double quotation marks (") - so I would assume that this would be the reason for the failing XMLTABLE parsing.

Answers (0)