LIBXO(3)
π LIBXO(3) π
okay bestie, welcome to the LIBXO(3) page β section 3, Library Functions Manual, library functions, the whole vibe. today we're talking about setting the output style on a libxo handle. it's giving "one tiny function, infinite formats". let's go π¦
β¨ NAME β¨
xo_set_style, xo_set_style_name β set the output style for a libxo handle
π LIBRARY π
library βlibxoβ
πΈ SYNOPSIS πΈ
#include <libxo/xo.h>
void
xo_set_style(xo_handle_t *handle, unsigned style);
int
xo_set_style_name(xo_handle_t *handle, const char *style);
π DESCRIPTION π
so like. you've got a handle. you want it to speak a certain language β text, XML, JSON, HTML, pick your fighter. that's what xo_set_style() is for, bestie. it sets the output style for a handle. π
and if you want the default handle? just pass a NULL handle. iconic. no cap.
the set of output styles libxo gives you is:
XO_STYLE_TEXTβ traditional text output. the classic. the original main character. πXO_STYLE_XMLβ XML encoded data π§XO_STYLE_JSONβ JSON encoded data β¨XO_STYLE_HTMLβ HTML encoded data π
then there's xo_set_style_name() β same energy, but you set the style by name, encoded as a string. and the name can be any of the styles: "text", "xml", "json", or "html". literally just type the word. lowkey the easiest API in the whole library fr fr.
EXAMPLE: c xo_set_style_name(NULL, "html");
that's it. that's the whole thing. it ate. π
π SEE ALSO π
π°οΈ HISTORY π°οΈ
the libxo library first appeared in FreeBSD 11.0. yes bestie, it's been around. π«Ά
βοΈ AUTHORS βοΈ
libxo was written by Phil Shafer <phil@freebsd.org>.
π ADDITIONAL DOCUMENTATION π
FreeBSD uses libxo version 1.7.5. complete documentation can be found on github:
https://juniper.github.io/libxo/1.7.5/html/index.html
libxo lives on github as:
https://github.com/Juniper/libxo
the latest release of libxo is available at:
https://github.com/Juniper/libxo/releases
go read it, it's giving "well documented library". obsessed. π
π°οΈ HISTORY π°οΈ
(yeah there's another one, the manpage said it twice, so we're saying it twice π)
the libxo library was added in FreeBSD 11.0.
βοΈ AUTHOR βοΈ
Phil Shafer
and that's the whole page bestie!! this one's from Debian, dated December 4, 2014, and it's the LIBXO(3) page β so if you ever need to flip your handle's style from "text" to "json" mid-vibe, you know exactly where to be. slay, stay encoded, and go emit something gorgeous πβ¨π
π¦ where this page comes from
- epel 9: libxo-devel 1.7.5-1.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 43: libxo-devel 1.7.5-2.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- fedora 44: libxo-devel 1.7.5-3.fc44 Β· LicenseRef-Callaway-BSD
- nixpkgs unstable: libxo 1.7.5
- Copyright (c) 2014, Juniper Networks, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms