Your xml isn't xml. :)
XML Naming Rules
XML elements must follow these naming rules:
- Element names are case-sensitive
- Element names must start with a letter or underscore
- Element names cannot start with the letters xml (or XML, or Xml, etc)
- Element names can contain letters, digits, hyphens, underscores, and periods
- Element names cannot contain spaces
If your replace sapces with underscore in your tags. You can obtain data using xmltabel.
select *
from xmltable(xmlnamespaces('http://xyz.co.uk/cust' as "ns0"), '/ns0:NewConnection'
passing xmltype('<?xml version="1.0" encoding="UTF-8"?>
<ns0:NewConnection xmlns:ns0="http://xyz.co.uk/cust">
<Customer>SA02121</Customer>
<Customer_name>John</Customer_name>
<Load_Date>2016-11-09</Load_Date>
<Load_Time>03:40:12</Load_Time>
</ns0:NewConnection>')
columns Customer varchar2(200) path 'Customer'
, Customer_name varchar2(200) path 'Customer_name'
, Load_Date varchar2(200) path 'Load_Date'
, Load_Time varchar2(200) path 'Load_Time')