In this article you will learn:
- Accepted file formats (XML and TXT)
- How to correctly structure the files
- Example of a valid XML file
- Example of a valid TXT file
- Where to get the official template
- How to upload files to the SES.Hospedajes portal
- Tools to validate your XML
- Frequently Asked Questions (FAQ)
๐งพ Accepted file formats
The SES.Hospedajes portal of the Ministry of the Interior allows guest records to be submitted in two formats:
| Format | Recommended | Features |
|---|---|---|
| XML | โ Yes | Official structure. Template provided by the Ministry. |
| TXT | โ ๏ธ Yes, with restrictions | Must follow strict format and may be more limited than XML. |
๐ Recommendation: whenever possible, use XML, as it is the most stable and supported format.
๐ XML file structure
The XML file must follow a specific scheme defined by the Ministry. The main components are:
XML File โโโ Header โ โโโ Establishment code โ โโโ Contact details โโโ Guest data โ โโโ Full name โ โโโ Document type and number โ โโโ Nationality โ โโโ Date of birth and gender โ โโโ Relationship with reservation holder (if applicable) โโโ Stay details โ โโโ Check-in/check-out dates โ โโโ Room number โ โโโ Travel purpose
๐ Important: All mandatory fields must be filled out and validated against the official schema to avoid processing errors.
๐งช Example of a valid XML file
<RegistroViajeros>
<Establecimiento>
<CodigoRegistro>12345678</CodigoRegistro>
<Nombre>Hotel Ejemplo</Nombre>
<Direccion>Calle Ficticia, 1</Direccion>
<Municipio>Madrid</Municipio>
<Provincia>Madrid</Provincia>
<Telefono>912345678</Telefono>
</Establecimiento>
<ParteEntrada>
<FechaEntrada>2025-05-06</FechaEntrada>
<NumeroHabitacion>101</NumeroHabitacion>
<Huesped>
<TipoDocumento>DNI</TipoDocumento>
<NumeroDocumento>12345678A</NumeroDocumento>
<Nombre>Juan</Nombre>
<Apellido1>Pรฉrez</Apellido1>
<Apellido2>Gรณmez</Apellido2>
<Sexo>H</Sexo>
<FechaNacimiento>1985-04-10</FechaNacimiento>
<Nacionalidad>ES</Nacionalidad>
<FechaExpedicion>2023-01-01</FechaExpedicion>
<LugarExpedicion>Madrid</LugarExpedicion>
</Huesped>
<Huesped>
<TipoDocumento>Pasaporte</TipoDocumento>
<NumeroDocumento>AB1234567</NumeroDocumento>
<Nombre>Maria</Nombre>
<Apellido1>Smith</Apellido1>
<Apellido2></Apellido2>
<Sexo>M</Sexo>
<FechaNacimiento>1990-08-20</FechaNacimiento>
<Nacionalidad>US</Nacionalidad>
<FechaExpedicion>2022-06-15</FechaExpedicion>
<LugarExpedicion>Washington DC</LugarExpedicion>
<RelacionTitular>CONYUGE</RelacionTitular>
</Huesped>
</ParteEntrada>
</RegistroViajeros>
๐ Example of a valid TXT file
The TXT format accepted by the SES.Hospedajes portal must follow a specific structure where each line represents one guest record, with fields separated by tabs. Here's a representative example:
Format:โ
Nombre|PrimerApellido|SegundoApellido|Sexo|FechaNacimiento|TipoDocumento|NumeroDocumento|Nacionalidad|FechaEntrada|HoraEntrada|FechaSalida|HoraSalida|Direccion|Localidad|CodigoPostal|Provincia|Pais|Telefono|Email|Parentesco|Rol
Example with data:โ
Marรญa|Garcรญa|Lรณpez|F|1990-05-12|DNI|12345678Z|ES|2025-05-18|14:00|2025-05-20|12:00|Calle Mayor 10|Madrid|28013|Madrid|ES|600123456|maria.garcia@example.com|Titular|Titular
๐ Important notes:
- Each field must be separated by a tab (
\t). - Fields must follow the order and format defined by the Ministry.
- Always validate your file before submission to avoid processing errors.
๐ฅ Where to get the official template
๐ Download the full technical manual from the official link below:
Instructions "Bulk communication registration" โ PDF v1.1.1
This document includes:
- The official XML structure
- Required fields and their formats
- Step-by-step upload instructions
- Technical notes on validation
๐ How to upload files to the SES.Hospedajes portal
- Go to seshospedajes.es and log in with your digital certificate, Cl@ve, or credentials.
- Navigate to the "Communication Submission" section.
- Select "Upload files".
- Attach your XML or TXT file.
- Submit the file and wait for confirmation from the system.
โ Tools to validate your XML
| Tool | Link | Main Features |
|---|---|---|
| XMLValidation.com | xmlvalidation.com | Checks structure and syntax. Easy to use. |
| FreeFormatter | freeformatter.com/xml-validator-xsd.html | Supports schema validation (XSD). Can format and clean XML. |
| Code Beautify | codebeautify.org/xmlvalidator | Clear interface. Highlights tag or encoding errors. |
๐ Advanced technical tip: If you have the official XSD from SES.Hospedajes, use schema validation to ensure your XML is not only well-formed but also logically correct.
โ Frequently Asked Questions (FAQ)
- Can I submit batch files?
- Yes, as long as they follow the official XML structure and format.
- What happens if the file contains errors?
- The system will reject it. That's why validation is essential.
- Which tool can I use to validate my XML?
- Any of the tools listed above.
- Is XML mandatory?
- No, TXT is also accepted, but XML provides better structural control.
I hope this article is helpful! If you need more information, contact us at support@civitfun.com โ weโll be happy to help. ๐โ๏ธ