The programmer starts with an init() sequence to be able to access the automatically generated configuration suggestion which is based on the hardware detection. After this it is possible to import,manipulate and export information.
To give you an overview how simple it is to use libsax in another language have a look at the following perl example which is used to change the default color depth of the current configuration to a value of 24 bit
#!/usr/bin/perl use SaX; sub main { my %section; my @importID = ( $SaX::SAX_CARD, $SaX::SAX_DESKTOP, $SaX::SAX_PATH ); my $config = new SaX::SaXConfig; foreach my $id (@importID) { $import = new SaX::SaXImport ( $id ); $import->setSource ( $SaX::SAX_SYSTEM_CONFIG ); $import->doImport(); $config->addImport ( $import ); $section{$import->getSectionName()} = $import; } my $mDesktop = new SaX::SaXManipulateDesktop ( $section{Desktop},$section{Card},$section{Path} ); if ($mDesktop->selectDesktop (0)) { $mDesktop->setColorDepth (24); } $config->setMode ($SaX::SAX_MERGE); $config->createConfiguration(); } main();