I try to use this:
when I use this xml:
<XMLname attrib1="Some value">
<Element>Some text</Element>
<DifferentElement attrib2="2">Some more text</DifferentElement>
<DifferentElement attrib3="2" attrib4="1">Even more text</DifferentElement>
</XMLname>
I can create a struct:
test = xml2struct('C:\bla\bla.xml');
(tested it with class(test))
It looks like this:
test =
Name: 'XMLname'
Attributes: [1x1 struct]
Data: ''
Children: [1x7 struct]
But I cannot access:
test.XMLname.Element.Text
I get:
??? Reference to non-existent field ‘XMLname’.
Any ideas?
Just tried it on R2010b and it works fine
Is it possible you have an older version of xml2struct somewhere on your matlab path? Make sure
which xml2structgives you the path you expect