JSFiddle - React, Tailwind, and code Playground

JavaScript

//a test string
var xmlstring = '<?xml version="1.0"?><dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd"> <head> <product srsName="WGS 1984" concise-name="time-series" operational-mode="official"> <title>NOAA\'s National Weather Service Forecast Data</title> <field>meteorological</field> <category>forecast</category> <creation-date refresh-frequency="PT1H">2010-12-23T16:42:43Z</creation-date> </product> <source> <more-information>http://www.nws.noaa.gov/forecasts/xml/</more-information> <production-center>Meteorological Development Laboratory<sub-center>Product Generation Branch</sub-center></production-center> <disclaimer>http://www.nws.noaa.gov/disclaimer.html</disclaimer> <credit>http://www.weather.gov/</credit> <credit-logo>http://www.weather.gov/images/xml_logo.gif</credit-logo> <feedback>http://www.weather.gov/feedback.php</feedback> </source> </head> <data> <location> <location-key>point1</location-key> <point latitude="40.69" longitude="-74.05"/> </location> <moreWeatherInformation applicable-location="point1">http://forecast.weather.gov/MapClick.php?textField1=40.69&amp;textField2=-74.05</moreWeatherInformation> <time-layout time-coordinate="local" summarization="none"> <layout-key>k-p3h-n9-1</layout-key> <start-valid-time>2010-12-23T13:00:00-05:00</start-valid-time> <start-valid-time>2010-12-23T16:00:00-05:00</start-valid-time> <start-valid-time>2010-12-23T19:00:00-05:00</start-valid-time> <start-valid-time>2010-12-23T22:00:00-05:00</start-valid-time> <start-valid-time>2010-12-24T01:00:00-05:00</start-valid-time> <start-valid-time>2010-12-24T04:00:00-05:00</start-valid-time> <start-valid-time>2010-12-24T07:00:00-05:00</start-valid-time> <start-valid-time>2010-12-24T10:00:00-05:00</start-valid-time> <start-valid-time>2010-12-24T13:00:00-05:00</start-valid-time> </time-layout> <parameters...