+/* ARGSUSED */
+static int
+xml_begin(struct md_mbuf *mbuf, const struct md_args *args,
+ const struct tm *tm, const char *os,
+ const char *title, enum roffmsec section,
+ const char *vol)
+{
+
+ if ( ! ml_puts(mbuf, "<?xml version=\"1.0\" "
+ "encoding=\"UTF-8\"?>\n", NULL))
+ return(0);
+ return(ml_puts(mbuf, "<mdoc xmlns:block=\"block\" "
+ "xmlns:body=\"body\" "
+ "xmlns:head=\"head\" "
+ "xmlns:inline=\"inline\">", NULL));
+}
+
+
+/* ARGSUSED */
+static int
+xml_end(struct md_mbuf *mbuf, const struct md_args *args)
+{
+
+ return(ml_puts(mbuf, "</mdoc>", NULL));
+}
+
+
+/* ARGSUSED */
+static ssize_t
+xml_beginstring(struct md_mbuf *mbuf,
+ const struct md_args *args,
+ const char *buf, size_t sz)
+{
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static ssize_t
+xml_endstring(struct md_mbuf *mbuf,
+ const struct md_args *args,
+ const char *buf, size_t sz)
+{
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static ssize_t
+xml_begintag(struct md_mbuf *mbuf, void *data,
+ const struct md_args *args, enum md_ns ns,
+ int tok, const int *argc, const char **argv)
+{
+ ssize_t res, sz;
+
+ if (-1 == (res = xml_printtagname(mbuf, ns, tok)))
+ return(-1);
+ if (-1 == (sz = xml_printtagargs(mbuf, argc, argv)))
+ return(-1);
+ return(res + sz);
+}
+
+
+/* ARGSUSED */
+static ssize_t
+xml_endtag(struct md_mbuf *mbuf, void *data,
+ const struct md_args *args, enum md_ns ns, int tok)
+{
+
+ return(xml_printtagname(mbuf, ns, tok));
+}
+
+
+/* ARGSUSED */
+int
+xml_alloc(void **p)
+{
+
+ *p = NULL;
+ return(1);
+}
+
+
+/* ARGSUSED */
+void
+xml_free(void *p)
+{
+
+ /* Do nothing. */
+}
+
+