04-10-2020 11:36 AM
I have been updating my holiday.xml files for years now so they are known working from last year. I updated them so today was a holiday. It did not work and I am wondering if there is something that the format does not like for this year 2020? This is a snippet of the file.
<Holidays>
<Holiday1>
<Holiday>01/01/20</Holiday>
<StartTime>00:00</StartTime>
<EndTime>23:59</EndTime>
</Holiday1>
<Holiday2>
<Holiday>04/10/20</Holiday>
<StartTime>11:59</StartTime>
<EndTime>23:59</EndTime>
</Holiday2>
<Holiday3>
<Holiday>05/25/20</Holiday>
<StartTime>00:00</StartTime>
<EndTime>23:59</EndTime>
</Holiday3>
<Holiday4>
<Holiday>07/04/20</Holiday>
<StartTime>00:00</StartTime>
<EndTime>23:59</EndTime>
</Holiday4>
Solved! Go to Solution.
04-10-2020 01:56 PM
04-10-2020 11:56 AM
Based on only that snippet of XML, yes, you are missing the closing Holidays tag.
<Holidays> <Holiday1> <Holiday>01/01/20</Holiday> <StartTime>00:00</StartTime> <EndTime>23:59</EndTime> </Holiday1> <Holiday2> <Holiday>04/10/20</Holiday> <StartTime>11:59</StartTime> <EndTime>23:59</EndTime> </Holiday2> <Holiday3> <Holiday>05/25/20</Holiday> <StartTime>00:00</StartTime> <EndTime>23:59</EndTime> </Holiday3> <Holiday4> <Holiday>07/04/20</Holiday> <StartTime>00:00</StartTime> <EndTime>23:59</EndTime> </Holiday4> </Holidays>
04-10-2020 12:10 PM
04-10-2020 01:40 PM
04-10-2020 01:45 PM
To the best of my knowledge it did work on 1/1/2020 but I can't be sure. This file was copied from the one I used in 2019. I have a test document that I I am using to test the holiday.xml file in. I will try what you have suggested and hopefully can figure this out.
04-10-2020 01:56 PM
04-10-2020 02:08 PM
I think between the leading zeros and the year format being wrong one of the two was the solution. I think the leading zeros was it. Not to mention my impatience. I am working from home and am wondering if the files were not updating as fast as I expected them to. However, your help is greatly appreciated.
04-10-2020 12:00 PM
...if this is only a partial snippet of what the XML file looks like--which I'm guessing--I'm not entirely sure.
But, check your start and end tags [<Holidays>… </Holidays>].
Even more, you have no XML declaration at the top.
...You also have leading zeros in your data elements. Not sure how your script operates, but my holiday scripts do not use leading zeros in the days/dates or months.
Just a few ideas to check.
Hope this helps.
-Sean
04-10-2020 12:09 PM
04-10-2020 12:17 PM
...then my next question is the application / script referencing the correct XML data file from the "refreshed" repository directory?
-Sean
04-10-2020 12:13 PM
...one addition. It's important to remember that XPath on UCCX reads XML files as a STRING variable. So if your holiday script is using a short date (for today) to evaluate against an XML data source:
04/10/20 does not equal 4/10/20
...I also highly recommend using something like Notepad++ with XML tools, to check the syntax of any XML file before uploading it to the doc repository.
-Sean
04-10-2020 01:12 PM
04-10-2020 01:25 PM
04-10-2020 01:37 PM
04-10-2020 01:43 PM
Ha! Thanks. That's awesome. More fodder for UCCX trivial pursuit... Hee hee hee...
Thanks again, Anthony--always good info...
-Sean
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide