Details

    • Steps to Reproduce:
      Hide

      Run the following query and have a look at last column:

      Begin
      	Declare xml xcontent = '<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	<report>
      		<data>
      			<year xsi:type="decimal">2018</year>
      		</data>
      	</report>
      	<waitSeconds xsi:type="decimal">13</waitSeconds>
           </root>' ;
      	Select *
      	From 
      		XmlTable(
      			XmlNamespaces ('http://www.w3.org/2001/XMLSchema-instance' as xsi),
      			'/root/report/data' 
      			PASSING xcontent 
      			Columns 
      				"year" integer,
      				waitSeconds xml Path 'root()/root/waitSeconds',
      				waitSecondsStr string Path 'root()/root/waitSeconds'
      	)a ;
      End ;;
      
      Show
      Run the following query and have a look at last column: Begin Declare xml xcontent = '<root xmlns:xsi= "http://www.w3.org/2001/XMLSchema- instance " > <report> < data > < year xsi: type = " decimal " >2018</ year > </ data > </report> <waitSeconds xsi: type = " decimal " >13</waitSeconds> </root>' ; Select * From XmlTable( XmlNamespaces ( 'http://www.w3.org/2001/XMLSchema- instance ' as xsi), '/root/report/ data ' PASSING xcontent Columns " year " integer , waitSeconds xml Path 'root()/root/waitSeconds' , waitSecondsStr string Path 'root()/root/waitSeconds' ) a ; End ;;

      Description

      Running the query:

      Begin
      	Declare xml xcontent = '<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      	<report>
      		<data>
      			<year xsi:type="decimal">2018</year>
      		</data>
      	</report>
      	<waitSeconds xsi:type="decimal">13</waitSeconds>
           </root>' ;
      	Select *
      	From 
      		XmlTable(
      			XmlNamespaces ('http://www.w3.org/2001/XMLSchema-instance' as xsi),
      			'/root/report/data' 
      			PASSING xcontent 
      			Columns 
      				"year" integer,
      				waitSeconds xml Path 'root()/root/waitSeconds',
      				waitSecondsStr string Path 'root()/root/waitSeconds'
      	)a ;
      End ;;
      

      and having a look at the structure we can see that the value 13 should be returned, while the value is not picked from xml for result.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  shawkins Steven Hawkins
                  Reporter:
                  dalex005 Dmitrii Pogorelov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: