*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: xo_attr | Section: 3 | Source: FreeBSD | File: xo_attr.3.gz
LIBXO(3) FreeBSD Library Functions Manual LIBXO(3) NAME xo_attr, xo_attr_h, xo_attr_hv - Add attribute name/value pairs to formatted output LIBRARY Text, XML, JSON, and HTML Output Emission Library (libxo, -lxo) SYNOPSIS #include <libxo/xo.h> xo_ssize_t xo_attr(const char *name, const char *fmt, ...); xo_ssize_t xo_attr_h(xo_handle_t *handle, const char *name, const char *fmt, ...); xo_ssize_t xo_attr_hv(xo_handle_t *handle, const char *name, const char *fmt, va_list vap); DESCRIPTION The 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}\n", 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. SEE ALSO xo_emit(3), libxo(3) HISTORY The libxo library first appeared in FreeBSD 11.0. AUTHORS libxo was written by Phil Shafer <[email protected]>. FreeBSD 14.1-RELEASE-p8 July, 2014 FreeBSD 14.1-RELEASE-p8

Navigation Options