XML
id: format_xml
Character Encoding and XML Structure
The character encoding of the data is - as with the live interface UTF-8
. The file starts with the XML header: <?xml version="1.0" encoding="UTF-8"?>
Then follows the array <meldescheine />
with at least one registration form <meldeschein />
This contains the data of the main guest (see field definitions) and optionally an array of accompanying persons <begleitperson />
.
!!! important "Note" The sequence of the data can be in any order.
This results in the following structure:
1 2 3 4 5 6 7 | <?xml version="1.0" encoding="UTF-8"?> <meldescheine><!-- Meldeschein 2 --><meldeschein><!-- Daten Hauptgast --><begleitperson><!-- Daten Begleiter 1--></begleitperson> <begleitperson><!-- Daten Begleiter 2--></begleitperson> </meldeschein><!-- Meldeschein 2 --><meldeschein><!-- Daten Hauptgast --><begleitperson><!-- Daten Begleiter 1--></begleitperson> <begleitperson><!-- Daten Begleiter 2--></begleitperson> </meldeschein> </meldescheine> |
Mandatory fields
Field | Data type | Explanation |
---|---|---|
anreise |
date | Arrival date of the guest in the format YYYY-MM-DD |
abreise |
date | Departure date of the guest in the format YYYY-MM-DD |
kategorie |
string | The ID of the tariff to be booked (can be viewed via API or via the web interface) |
Individual Fields
All other fields are defined individually for each municipality. Whether these are mandatory or optional fields can be found in the definition of the municipalities.
!!! important "Field assignment" An assignment of the fields of the posting system to the import interface can be stored in the system. Thus it is not absolutely necessary to make adjustments to the generation of the XML data set
!!! warning "Mandatory fields of the municipality" If certain data of a municipality are defined as mandatory fields, these must also be transferred to the XML file
Accompanying Persons
Accompanying persons of a registration form can be posted via the tag <begleitperson />
. Thus any number of accompanying persons can be booked. All defined fields of the main guest can also be used for accompanying persons.
!!! warning The fields anreise
, abreise
as well as kategorie
must also always be filled for accompanying persons.
Example Accompanying Persons:
1 2 3 4 5 6 7 8 9 10 11 | <!-- ... --><meldeschein><!-- Daten des Hauptgastes --><anreise>2019-11-22</anreise> <abreise>2019-11-25</anreise> <kategorie>1</kategorie><!-- Ende Daten des Hauptgastes --><begleitperson> <anreise>2019-11-22</anreise> <abreise>2019-11-23</anreise> <kategorie>1</kategorie> <! -- optionale weitere Daten --> </begleitperson> <begleitperson><!-- weiterer Begleiter--></begleitperson> <begleitperson><!-- weiterer Begleiter--></begleitperson> </meldeschein><!-- ... --> |
Example Data
An example of a posting from a registration form with:
- 1 registration form
- Main guest with personal data
- One accompanying person
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <?xml version="1.0" encoding="UTF-8"?> <meldescheine> <meldeschein> <hausnummer>.</hausnummer> <anrede>Mr.</anrede> <name>Mustermann</name> <vorname>Max</vorname> <plz>123456</plz> <ort>Musterstadt</ort> <land>Germany</land> <anreise>2019-10-19</anreise> <abreise>2019-10-20</abreise> <kategorie>1</kategorie> <begleitperson> <anrede>Ms.</anrede> <name>Mustermann</name> <vorname>Karin</vorname> <kategorie>1</kategorie> <anreise>2019-10-19</anreise> <abreise>2019-10-20</abreise> </begleitperson> </meldeschein> </meldescheine> |