Deleting a line in an XML file
6 views (last 30 days)
Show older comments
Hey there,
I'm fairly new to MatLab's features of reading files and whatnot, and I'm stuck on trying to get rid of a line, or maybe read a different line in an XML file. I'mm using xml2struct ( XML2Struct ) to try and get data from a file downloaded from the internet. The program is only reading the comment in the XML, and since it is a file downloaded from the internet, I cannot control the comment being there. Her's the code I have so far:
urlwrite('http://earthquake.usgs.gov/designmaps/us/inc/data-api.inc.php?latitude=40&longitude=-122&edition=ibc-2009&siteclass=3&riskcategory=0','1.xml');
test = xml2struct('1.xml')
test.output
Doing this gives me the comment in the XML file only. If I go through and manually delete the comment, the code works, but I would like a code or method to do it automatically. Any suggestions?
Thanks in advance!
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!