[Reddit Cross Post] Reading XML data where commas are used as thousands and as separators
I need to extract the data of a lab equipment that only exports an XML file, so I’m trying to have a simple script to convert it to paired data or create a graph. The problem is: whenever the Y values go over 1000 it adds a comma separator. Using simple ‘,’ splits won’t work. What is the best approach for something like this? Why would they make it like that? …
Hopefully it is simple to adjust (already tried the equipment side approach but can’t make any modifications to the export file).
<XVALUES>6.9661,……….1.9950,1.9896,1.9845,1.9791,1.9741,1.9688,1.9632,1.9578,1.9523,1.9459,1.9376,1.9301,1.9233,1.9160,1.9086,1.9020,1.8952,1.8885,1.8820,1.8756,1.8693,1.8630,1.8569,1.8509,1.8446,1.8385,1.8327,1.8267,1.8209,1.8149</XVALUES>
<YVALUES>-10.19,…….11.17,14.56,18.45,………..,1,935.56,1,928.36,1,922.59,1,918.27,1,914.43,1,909.62,1,903.38,1,898.58,1,893.77,1,888.49,1,883.69,1,879.36,1,875.04,1,870.24,1,865.43,1,863.51,1,862.55,1,861.11,1,859.19,1,855.35,1,853.42,1,851.02,1,849.58,1,846.70,1,845.74,1,844.30,1,841.90,1,839.98,1,838.05,1,837.09,1,833.25,1,827.01,1,821.24,1,812.60,1,795.30,1,744.39,1,709.81,1,681.95,1,646.88,1,613.26,1,587.80,1,564.26,1,537.85,1,515.27,1,496.06,1,476.84,1,459.07,1,442.74,1,427.37,1,411.04,1,394.23,1,380.78,1,369.73,1,357.72,1,344.27</YVALUES>
Source: https://www.reddit.com/r/matlab/comments/1o6efqo/reading_xml_data_where_commas_are_used_as/I need to extract the data of a lab equipment that only exports an XML file, so I’m trying to have a simple script to convert it to paired data or create a graph. The problem is: whenever the Y values go over 1000 it adds a comma separator. Using simple ‘,’ splits won’t work. What is the best approach for something like this? Why would they make it like that? …
Hopefully it is simple to adjust (already tried the equipment side approach but can’t make any modifications to the export file).
<XVALUES>6.9661,……….1.9950,1.9896,1.9845,1.9791,1.9741,1.9688,1.9632,1.9578,1.9523,1.9459,1.9376,1.9301,1.9233,1.9160,1.9086,1.9020,1.8952,1.8885,1.8820,1.8756,1.8693,1.8630,1.8569,1.8509,1.8446,1.8385,1.8327,1.8267,1.8209,1.8149</XVALUES>
<YVALUES>-10.19,…….11.17,14.56,18.45,………..,1,935.56,1,928.36,1,922.59,1,918.27,1,914.43,1,909.62,1,903.38,1,898.58,1,893.77,1,888.49,1,883.69,1,879.36,1,875.04,1,870.24,1,865.43,1,863.51,1,862.55,1,861.11,1,859.19,1,855.35,1,853.42,1,851.02,1,849.58,1,846.70,1,845.74,1,844.30,1,841.90,1,839.98,1,838.05,1,837.09,1,833.25,1,827.01,1,821.24,1,812.60,1,795.30,1,744.39,1,709.81,1,681.95,1,646.88,1,613.26,1,587.80,1,564.26,1,537.85,1,515.27,1,496.06,1,476.84,1,459.07,1,442.74,1,427.37,1,411.04,1,394.23,1,380.78,1,369.73,1,357.72,1,344.27</YVALUES>
Source: https://www.reddit.com/r/matlab/comments/1o6efqo/reading_xml_data_where_commas_are_used_as/ I need to extract the data of a lab equipment that only exports an XML file, so I’m trying to have a simple script to convert it to paired data or create a graph. The problem is: whenever the Y values go over 1000 it adds a comma separator. Using simple ‘,’ splits won’t work. What is the best approach for something like this? Why would they make it like that? …
Hopefully it is simple to adjust (already tried the equipment side approach but can’t make any modifications to the export file).
<XVALUES>6.9661,……….1.9950,1.9896,1.9845,1.9791,1.9741,1.9688,1.9632,1.9578,1.9523,1.9459,1.9376,1.9301,1.9233,1.9160,1.9086,1.9020,1.8952,1.8885,1.8820,1.8756,1.8693,1.8630,1.8569,1.8509,1.8446,1.8385,1.8327,1.8267,1.8209,1.8149</XVALUES>
<YVALUES>-10.19,…….11.17,14.56,18.45,………..,1,935.56,1,928.36,1,922.59,1,918.27,1,914.43,1,909.62,1,903.38,1,898.58,1,893.77,1,888.49,1,883.69,1,879.36,1,875.04,1,870.24,1,865.43,1,863.51,1,862.55,1,861.11,1,859.19,1,855.35,1,853.42,1,851.02,1,849.58,1,846.70,1,845.74,1,844.30,1,841.90,1,839.98,1,838.05,1,837.09,1,833.25,1,827.01,1,821.24,1,812.60,1,795.30,1,744.39,1,709.81,1,681.95,1,646.88,1,613.26,1,587.80,1,564.26,1,537.85,1,515.27,1,496.06,1,476.84,1,459.07,1,442.74,1,427.37,1,411.04,1,394.23,1,380.78,1,369.73,1,357.72,1,344.27</YVALUES>
Source: https://www.reddit.com/r/matlab/comments/1o6efqo/reading_xml_data_where_commas_are_used_as/ xml, matlab, data import, reddit MATLAB Answers — New Questions