You can also create an empty document by using axl_doc_create and fill the initial root node using the axl_doc_set_root function. Once the document have an initial root node, you can add more nodes as childs to the root element previously added.