I tried to load the XML data into Mysql table, I'm getting struggled in loading the xml data into mysql table.
This is my XML file
<entry>
<id>urn:lsid:ibm.com:blogs:blog-f66c48be-05e9-4ce2-bfae-bcb3f0f0e0d1</id>
<title type="text">abcd</title>
<author>
<name>abcd</name>
<snx:isExternal>false</snx:isExternal>
</author>
<published>2019-02-14T21:26:28+05:30</published>
<updated>2019-02-14T21:26:43+05:30</updated>
<snx:rank scheme="http://www.example.com/recommendations">0</snx:rank> </entry>
- I can't able to get the value inside the snx:rank value.
- In my updated tag i have datatime with +05:30 is there any way to remove the value?
- I need the name which is nested of author tag, provide me suggestion to get the name
I'm getting error while creating table in mysql
create table tbl_source (id varchar (500),title varchar (500), name varchar(50), updated varchar(50), snx:rank scheme="http://www.example.com/recommendations" int);
without using column name snx:rank column there is no error displayed but I'm getting null in name column.
xml import query
LOAD XML INFILE "/root/CommunityBlog_7cdc528d-7fda-4eb3-bff7-d9ccbc7d8f7b_02202019015559983PM.xml" INTO TABLE tbl_source ROWS IDENTIFIED BY '<entry>';