xml2struct cannot access element(s)
- by csetzkorn
I try to use this:
xml2struct
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?