2 * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.nb.jaxrs;
10 import java.io.IOException;
11 import java.io.OutputStream;
12 import javax.ws.rs.Produces;
13 import javax.ws.rs.core.MediaType;
14 import javax.ws.rs.ext.Provider;
15 import org.opendaylight.restconf.api.FormattableBody;
16 import org.opendaylight.restconf.api.MediaTypes;
19 @Produces({ MediaTypes.APPLICATION_YANG_DATA_XML, MediaType.APPLICATION_XML, MediaType.TEXT_XML })
20 public final class XmlFormattableBody extends FormattableBodyWriter {
22 void writeTo(final FormattableBody body, final OutputStream out) throws IOException {
23 body.formatToXML(out);