Removing textflags in xml2struct?
Show older comments
Hello, I am currently using xml2struct provided in the link below.
I was wondering if there is a way to modify the code so I don't get textflags <Text></Text>.
So input xmlfile of this
<XMLname attrib1="Some value">
<Element>Some text</Element>
</XMLname>
will produce s.XMLname.Element = "Some text";
instead of s.XMLname.Element.Text = "Some text";
Thank you.
Accepted Answer
More Answers (1)
Sujit Muduli
on 9 Mar 2018
Edited: Walter Roberson
on 9 Mar 2018
0 votes
Hi Jin,
I didn't get a chance to go into the detailed implementation of this function, but yeah it should be possible to get the desired result. You just need to find out the location in the code where the structure is getting created and change the structure definition according to your need. You may refer this documentation link to find out more on struct in MATLAB.
1 Comment
Jin Wook Hwang
on 12 Mar 2018
Categories
Find more on Structured Data and XML Documents in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!