---
name: "xo_set_version"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/xo_set_version"
---

# xo\_set\_version(3)

record content-version information in encoded output

## NAME

**xo\_set\_version**, **xo\_set\_version\_h** – record content-version information in encoded output

## LIBRARY

library “libxo”

## SYNOPSIS

**#include \<libxo/xo.h\>**

*void*\

**xo\_set\_version**(*const char \*version*);

*void*\

**xo\_set\_version\_h**(*xo\_handle\_t \*xop*, *const char \*version*);

## DESCRIPTION

The **xo\_set\_version** function records a version number to be emitted as part of the data for encoding styles (XML and JSON). This version number is suitable for tracking changes in the content, allowing a user of the data to discern which version of the data model is in use.

## SEE ALSO

[xo\_emit(3)](/xo_emit/3.md), [libxo(3)](/libxo/3.md)

## HISTORY

The **libxo** library first appeared in FreeBSD 11.0.

## AUTHORS

**libxo** was written by Phil Shafer ⟨*phil@freebsd.org*⟩.
