XML Example
Home
►Public Holiday Database
►XML Example
►Questions?
Send us an email.
XML Example
We provide you with 4 XML files.
1. Current year's holidays
2. Next year's holidays
3. Holiday names
4. List of countries
The following example shows the public holiday database.
<?xml version="1.0" encoding="UTF-8"?>
<xmlRoot>
- <data>
<date>2015-01-01</date>
<holiday>new_years_day</holiday>
<country>ad</country>
<cities/>
<states/>
<states_exceptions/>
<districts/>
<districts_exceptions/>
<regions/>
<half_day/>
<public_sector/>
<data>
- <data>
<date>2015-10-15</date>
<holiday>navratri_day</holiday>
<country>ad</country>
<cities/>
<states/>
<states_exceptions/>
<districts>Odisha,Assam,Madhya Pradesh,Meghalaya,Tripura</districts>
<districts_exceptions/>
<regions/>
<half_day/>
<public_sector/>
<data>
</xmlRoot>
Understanding the above example...
<date>: year-month-day for the holiday. If the date equals 0000-00-00
, this means the date is not yet known — in other words, the date is TBA
.
<holiday>: holiday ID. This matches the holiday name in the holiday name database.
<country>: Used to obtain the country name from the country name database. Although most country codes are standardized, some countries or locations have no official country code such as Akrotiri and Dhekelia
.
<cities>: Some public holidays happen only in certain cities.
<states>: Some public holidays happen only in certain states.
<states_exceptions>: In some situations, there the majority of states observe the public holiday while a few do not. This element tells you which states do not observe the public holiday.
<districts>: Some public holidays happen only in certain districts.
<districts_exceptions>: Same as states_exceptions
.
<regions>: Some public holidays happen only in certain regions.
<half_day>: Some public holidays only happen for half a day. This element tells you if it is the morning or afternoon.
<public_sector>: Some public holidays are only observed by the public sector
. If this is a public sector holiday, this element will contain the word yes
.
Purchase Database
Password Manager
►Bounce Emails
►Search
Menu
Public holidays
►Holiday list
►Upcoming holidays
►Moon phases
►Search
►Stats
►Religious holidays
►Home
►Download Database
Webmasters can download our entire public holiday database in XML format.
Public Holiday Database
►Webmasters can also download some free XML files.
Free XML Files
►FYI
Hols
[holz]
Plural noun: British informal word for
holidays.
DB
[dee bee]
Technology:
database.
Hols DB
The public holiday database.