I am very new to parsing XML data with javascript, so please excuse me if my question is a bit simple.
I am parsing data from an XMl file with javascript using a standard xmlHTTPRequest. The format of the URL that I am pulling the XML data from is something like: “http://example.com/abcyymmdd-data.xml”. The (yymmdd) portion of the url represents the date and the files are updated daily. I would like to insert a javascript code in the url in place of yymmdd so that a new XML file is parsed each day. How might I achieve this?
Thanks,
Carlos
You can retrieve the current date in
yymmddformat like:Example at JS Fiddle.