__init__ constructor

On this page

init

Initializes a new instance of this class with default options.

def __init__(self):
    ...

Example

from groupdocs.assembly.data import XmlDataLoadOptions, XmlDataSource
from groupdocs.assembly import DataSourceInfo, DocumentAssembler

options = XmlDataLoadOptions()
options.always_generate_root_object = True  # optional setting

xml_source = XmlDataSource("staff-roster.xml", options)

assembler = DocumentAssembler()
assembler.assemble_document(
    "staff-roster-root.docx",
    "staff-roster-root-report.docx",
    DataSourceInfo(xml_source, "data")
)

See Also

On this page