Import .XML data into Matlab?
Hi guys,
I want to import an xml file and its data into matlab so that I can read the data.
I know you have to do something like: xDoc = xmlread(‘info.xml’);
But I don’t know much else after that. What code would I need to write to get the ‘Customer’ details from a .xml file with following content?
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Shop Target="Something" Source="Something else">
<Customer ID="" LastName="Smith" FirstName="Joe" Birthday="1950/01/01" Gender="male">
<Purchase Type="Type 1" Time="2016/02/23 09:45" />
<Purchase Type="Type 2" Time="2016/02/24 09:45" />
</Customer>
</Shop>
Thank youHi guys,
I want to import an xml file and its data into matlab so that I can read the data.
I know you have to do something like: xDoc = xmlread(‘info.xml’);
But I don’t know much else after that. What code would I need to write to get the ‘Customer’ details from a .xml file with following content?
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Shop Target="Something" Source="Something else">
<Customer ID="" LastName="Smith" FirstName="Joe" Birthday="1950/01/01" Gender="male">
<Purchase Type="Type 1" Time="2016/02/23 09:45" />
<Purchase Type="Type 2" Time="2016/02/24 09:45" />
</Customer>
</Shop>
Thank you Hi guys,
I want to import an xml file and its data into matlab so that I can read the data.
I know you have to do something like: xDoc = xmlread(‘info.xml’);
But I don’t know much else after that. What code would I need to write to get the ‘Customer’ details from a .xml file with following content?
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<Shop Target="Something" Source="Something else">
<Customer ID="" LastName="Smith" FirstName="Joe" Birthday="1950/01/01" Gender="male">
<Purchase Type="Type 1" Time="2016/02/23 09:45" />
<Purchase Type="Type 2" Time="2016/02/24 09:45" />
</Customer>
</Shop>
Thank you xml, gender MATLAB Answers — New Questions