0001 function po = fromxml(xml)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 sch = xml.getChildNodes;
0012 for c=1:sch.getLength
0013 x = sch.item(c-1);
0014 switch char(x.getNodeName)
0015 case 'creator'
0016 p.creator = char(x.getTextContent);
0017 case 'created'
0018 xch = x.getChildNodes;
0019 p.created = time(xch.item(1));
0020 case 'ip'
0021 p.ip = char(x.getTextContent);
0022 case 'hostname'
0023 p.hostname = char(x.getTextContent);
0024 case 'os'
0025 p.os = char(x.getTextContent);
0026 case 'matlab_version'
0027 p.matlab_version = char(x.getTextContent);
0028 case 'sigproc_version'
0029 p.sigproc_version = char(x.getTextContent);
0030 case 'ltpda_version'
0031 p.ltpda_version = char(x.getTextContent);
0032 otherwise
0033 end
0034 end
0035
0036
0037 po = provenance(p);
0038
0039