Comments on: Parsing XML strings https://undocumentedmatlab.com/blog/parsing-xml-strings Charting Matlab's unsupported hidden underbelly Fri, 20 Jul 2018 08:53:21 +0000 hourly 1 https://wordpress.org/?v=4.4.1 By: Yair Altmanhttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-415552 Thu, 26 Oct 2017 19:35:15 +0000 http://undocumentedmatlab.com/?p=6838#comment-415552 @Peter – in general, yes it would indeed be faster but you need to take into consideration that XML is much more than simple tags enclosed within < and >. Tags can have attributes, and comments and binary CData etc. etc. If your XML is very simple and does not contain such nuisances then text parsing would be simple and faster, but if there is a chance that the XML file contains them then you’d better off rely on the more general parser for robustness.

]]>
By: Peter Cookhttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-415551 Thu, 26 Oct 2017 18:58:01 +0000 http://undocumentedmatlab.com/?p=6838#comment-415551 Yair,

I have an application I wrote that inhales rather large XML files using xml2struct and the performance is less-than-ideal. I’ve got an idea from a different blog post of yours about faster ASCII file parsing via fread. The idea would be to inhale the xml file in binary mode, and look for ASCII 60 and ASCII 62 and partition the data from that starting point. Do you think this approach would lend itself to faster xml reads?

]]>
By: Yair Altmanhttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-414779 Tue, 10 Oct 2017 23:44:37 +0000 http://undocumentedmatlab.com/?p=6838#comment-414779 @Michal – when you say that something “does not work at all” you provide zero information about what you tried to do and what happened. If you expect me to spend time to try to help you, then the minimum that you should do is to spend the time to include useful information that could help diagnose the problem. If you don’t have the time to add this information, then I don’t have the time to assist you, sorry.

]]>
By: Michal Kvasnickahttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-414689 Mon, 09 Oct 2017 14:16:40 +0000 http://undocumentedmatlab.com/?p=6838#comment-414689 @Yair Undocumented functionality (first code box) does not work at all (R2017b)!!!
I always got null result. Any workaround?

]]>
By: Ondrejhttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-403474 Wed, 22 Mar 2017 07:47:51 +0000 http://undocumentedmatlab.com/?p=6838#comment-403474 Hi Yair,
I am curious about some profiling and how fast each of the method is.
Thanks.

]]>
By: americanlamboard.comhttps://undocumentedmatlab.com/blog/parsing-xml-strings#comment-400208 Tue, 14 Feb 2017 09:55:33 +0000 http://undocumentedmatlab.com/?p=6838#comment-400208 @shsteimer I am passing in xml string and it is returning null. It does not throw any exception. What must be wrong?

]]>