public static <T> void writeTo(XMLStreamWriter writer, T message, Schema<T> schema)
            throws IOException, XMLStreamException, XmlOutputException
    {
        writer.writeStartElement(schema.messageName());

        schema.writeTo(new XmlOutput(writer, schema), message);

        writer.writeEndElement();
    }
Serializes the {@code message} into an {@link XMLStreamWriter} using the given {@code schema}.
protostuff-xml/src/main/java/io/protostuff/XmlIOUtil.java