Serialize the value to an XML file using the root processor.

    :param root_processor: Root processor of the XML document.
    :param value: Value to serialize.
    :param xml_file_path: Path to the XML file to which the serialized value will be written.
    :param encoding: Encoding of the file.
    :param indent: If specified, then the XML will be formatted with the specified indentation.

def serialize_to_file(
        root_processor,  # type: RootProcessor
        value,  # type: Any
        xml_file_path,  # type: Text
        encoding='utf-8',  # type: Text
        indent=None  # type: Optional[Text]
):
    # type: (...) -> None
    """
    Serialize the value to an XML file using the root processor.

    :param root_processor: Root processor of the XML document.
    :param value: Value to serialize.
    :param xml_file_path: Path to the XML file to which the serialized value will be written.
    :param encoding: Encoding of the file.
    :param indent: If specified, then the XML will be formatted with the specified indentation.
    """
    serialized_value = serialize_to_string(root_processor, value, indent)

    with open(xml_file_path, 'w', encoding=encoding) as xml_file:
        xml_file.write(serialized_value)