Working with Simple Data Sources

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Assembly MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-assembly -- dnx GroupDocs.Assembly.Mcp --yes
Folders, licensing and more →

Support for simple and standalone data sources

GroupDocs.Assembly for Node.js via Java can read JSON, XML and CSV data directly, without building a DataSet first. Each format has its own data source class:

ClassDataLoad options class
JsonDataSourceJSON file or streamJsonDataLoadOptions
XmlDataSourceXML file or stream (with an optional XML schema)XmlDataLoadOptions
CsvDataSourceCSV file or streamCsvDataLoadOptions

All three classes recognize typed values (numbers, Boolean values, dates) from their string representations, so you can use arithmetic, aggregate extension methods and custom number and date-time formats in templates.

A data source object is wrapped in a DataSourceInfo and passed to DocumentAssembler.assembleDocument:

const groupdocs = require('@groupdocs/groupdocs.assembly');

const dataSource = new groupdocs.JsonDataSource("managers.json");
const assembler = new groupdocs.DocumentAssembler();
assembler.assembleDocument("template.docx", "report.docx",
    new groupdocs.DataSourceInfo(dataSource, "managers"));
Articles in this section