If you want to save to XML from the CLI try something like:
C-style # show running-config nacm | display xml | save my-nacm-backup.xml
J-style: > show configuration nacm | display xml | save my-nacm-backup.xml
or if you want to convert ConfD values to XML, see:
Well, you haven’t provided anywhere near enough information to give specific comments, but of course the NACM rules are in principle applied to all data access. I.e. if you start a transaction via maapi for a given user session, maapi_save_config() will only be able to save the data that the NACM rules allow access to for that user. This can be “bypassed” for access via maapi, since it is often used for “system” access. The general way is to use a user session with context “system”, see the documentation for maapi_start_user_session() in the confd_lib_maapi(3) manual page.