Query: xo_attr_h
OS: freebsd
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
LIBXO(3) BSD Library Functions Manual LIBXO(3)NAMExo_emit -- emit formatted output based on format string and argumentsLIBRARYlibrary ``libxo''SYNOPSIS#include <libxo/xo.h> int xo_attr(const char *name, const char *fmt, ...); int xo_attr_h(xo_handle_t *handle, const char *name, const char *fmt, ...); int xo_attr_hv(xo_handle_t *handle, const char *name, const char *fmt, va_list vap);DESCRIPTIONThe xo_attr() function emits attributes for the XML output style. The attribute value is recorded in the handle and is attached to the next field that is emitted via a xo_emit(3) call. The name parameter give the name of the attribute to be encoded. The fmt parameter gives a printf-style format string used to format the value of the attribute using any remaining arguments, or the vap parameter as passed to xo_attr_hv(). EXAMPLE: xo_attr("seconds", "%ld", (unsigned long) login_time); struct tm *tmp = localtime(login_time); strftime(buf, sizeof(buf), "%R", tmp); xo_emit("Logged in at {:login-time} ", buf); XML: <login-time seconds="1408336270">00:14</login-time> Since attributes are only emitted in XML, their use should be limited to meta-data and additional or redundant representations of data already emitted in other form.ADDITIONAL DOCUMENTATIONComplete documentation can be found on github: http://juniper.github.io/libxo/libxo-manual.html libxo lives on github as: https://github.com/Juniper/libxo The latest release of libxo is available at: https://github.com/Juniper/libxo/releasesSEE ALSOxo_emit(3)HISTORYThe libxo library was added in FreeBSD 11.0.AUTHORPhil ShaferBSDJune 5, 2019 BSD
Related Man Pages |
---|
xo_create(3) - freebsd |
xo_set_style(3) - freebsd |
xo_emit_h(3) - freebsd |
xo_errx(3) - freebsd |
xo_err(3) - freebsd |
Similar Topics in the Unix Linux Community |
---|
The Whole Story on #! /usr/bin/ksh |
FreeBSD Kernel Internals, Dr. Marshall Kirk McKusick |
Is UNIX an open source OS ? |
A simple UNIXtime component in Vue.js |
Controlling user input |