# nav-gov-hu/m2m-xml-editor architecture

> Architecture diagram of the GitHub repository nav-gov-hu/m2m-xml-editor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nav-gov-hu/m2m-xml-editor
- Repository: https://github.com/nav-gov-hu/m2m-xml-editor

## Overview

M2M XML EDITOR is a Java application for opening, editing, validating, versioning, printing, and optionally submitting NAV M2M XML documents. The principal workflow starts with uploading or opening XML, resolving its schema and UI model, building an editable form, then validating and saving changes. The README also documents large and multiform XML handling, printing, template-resource management, administration, and M2M status tracking. Edges are based on README-described behavior; source excerpts are incomplete, so implementation-level links not demonstrated there are omitted.

Main entry points: [`nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/NavXsdParserToolWebApplication.java`](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/NavXsdParserToolWebApplication.java) (Web application), [`nav-xsd-parser-tool-schema-registry/src/main/java/hu/gov/nav/xsdparsertool/schemaregistry/service/FileSystemSchemaRegistryService.java`](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-schema-registry/src/main/java/hu/gov/nav/xsdparsertool/schemaregistry/service/FileSystemSchemaRegistryService.java) (Schema registry), [`nav-xsd-parser-tool-m2m-submitter/src/main/java/hu/nav/m2m/submitter/service/SubmissionService.java`](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-m2m-submitter/src/main/java/hu/nav/m2m/submitter/service/SubmissionService.java) (M2M submission), [`nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java`](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java) (Form builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editor["XML editing"]
  node_web["Web application"]
  node_xmlfiles["XML files"]
  node_large_xml["Large XML handling"]
  node_multiform["Multiform documents"]
  node_printing["Print views"]
  node_versioning["XML versioning"]
end

subgraph group_schema["Schema and validation"]
  node_schema_registry["Schema registry"]
  node_xsd_parser["XSD parser"]
  node_ui_model["UI model parser"]
  node_form_builder["Form builder"]
  node_processing["XML processing"]
  node_xsd_validation["XSD validation"]
  node_xpath_validation["XPath validation"]
end

subgraph group_operations["Administration and resources"]
  node_templates["Template catalog"]
  node_admin["Administration"]
  node_database[("Application database")]
end

subgraph group_submission["NAV submission"]
  node_submission["M2M submission"]
  node_nav(("NAV M2M service"))
end

node_user(("Editor user"))

node_user -->|"opens editor"| node_web
node_web -->|"opens XML"| node_xmlfiles
node_xmlfiles -->|"resolves schema"| node_schema_registry
node_schema_registry -->|"supplies XSD"| node_xsd_parser
node_schema_registry -->|"supplies UI model"| node_ui_model
node_xsd_parser -->|"defines structure"| node_form_builder
node_ui_model -->|"guides form"| node_form_builder
node_form_builder -->|"renders form"| node_web
node_web -->|"edits XML"| node_processing
node_web -->|"runs XSD checks"| node_xsd_validation
node_web -->|"runs XPath checks"| node_xpath_validation
node_web -->|"previews large files"| node_large_xml
node_web -->|"handles form parts"| node_multiform
node_web -->|"creates print view"| node_printing
node_web -->|"creates versions"| node_versioning
node_web -.->|"manages templates"| node_templates
node_web -->|"administers settings"| node_admin
node_web -->|"submits documents"| node_submission
node_submission -->|"sends submission"| node_nav
node_submission -.->|"tracks status"| node_database

click node_web "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/NavXsdParserToolWebApplication.java"
click node_xmlfiles "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/XmlFileSessionService.java"
click node_schema_registry "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-schema-registry/src/main/java/hu/gov/nav/xsdparsertool/schemaregistry/service/FileSystemSchemaRegistryService.java"
click node_xsd_parser "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-xsd/src/main/java/hu/gov/nav/xsdparsertool/xsd/service/BasicXsdParserService.java"
click node_ui_model "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-uimodel/src/main/java/hu/gov/nav/xsdparsertool/uimodel/service/XmlUiModelParserService.java"
click node_form_builder "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java"
click node_processing "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/service/DefaultXmlProcessingService.java"
click node_xsd_validation "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/validation/XsdValidationService.java"
click node_xpath_validation "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xpath/service/XPathValidationOrchestratorService.java"
click node_large_xml "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/LargeXmlPreviewService.java"
click node_multiform "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-multiform/src/main/java/hu/gov/nav/xsdparsertool/multiform/MultiformService.java"
click node_printing "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-print/src/main/java/hu/gov/nav/xsdparsertool/print/service/DefaultXmlPrintService.java"
click node_versioning "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-versioning/src/main/java/hu/gov/nav/xsdparsertool/versioning/VersioningTool.java"
click node_templates "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-github-updater/src/main/java/hu/gov/nav/xsdparsertool/web/githubupdater/service/GitHubTemplateCatalogService.java"
click node_admin "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/api/AdminController.java"
click node_submission "https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-m2m-submitter/src/main/java/hu/nav/m2m/submitter/service/SubmissionService.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_xmlfiles,node_large_xml,node_multiform,node_printing,node_versioning,node_user toneBlue
class node_schema_registry,node_xsd_parser,node_ui_model,node_form_builder,node_processing,node_xsd_validation,node_xpath_validation toneAmber
class node_templates,node_admin,node_database toneMint
class node_submission,node_nav toneRose
```

## Components

### XML editing

- [Web application](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/NavXsdParserToolWebApplication.java): `nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/NavXsdParserToolWebApplication.java`
- [XML files](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/XmlFileSessionService.java): `nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/XmlFileSessionService.java`
- [Large XML handling](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/LargeXmlPreviewService.java): `nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xmlfile/service/LargeXmlPreviewService.java`
- [Multiform documents](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-multiform/src/main/java/hu/gov/nav/xsdparsertool/multiform/MultiformService.java): `nav-xsd-parser-tool-multiform/src/main/java/hu/gov/nav/xsdparsertool/multiform/MultiformService.java`
- [Print views](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-print/src/main/java/hu/gov/nav/xsdparsertool/print/service/DefaultXmlPrintService.java): `nav-xsd-parser-tool-print/src/main/java/hu/gov/nav/xsdparsertool/print/service/DefaultXmlPrintService.java`
- [XML versioning](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-versioning/src/main/java/hu/gov/nav/xsdparsertool/versioning/VersioningTool.java): `nav-xsd-parser-tool-versioning/src/main/java/hu/gov/nav/xsdparsertool/versioning/VersioningTool.java`

### Schema and validation

- [Schema registry](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-schema-registry/src/main/java/hu/gov/nav/xsdparsertool/schemaregistry/service/FileSystemSchemaRegistryService.java): `nav-xsd-parser-tool-schema-registry/src/main/java/hu/gov/nav/xsdparsertool/schemaregistry/service/FileSystemSchemaRegistryService.java`
- [XSD parser](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-xsd/src/main/java/hu/gov/nav/xsdparsertool/xsd/service/BasicXsdParserService.java): `nav-xsd-parser-tool-xsd/src/main/java/hu/gov/nav/xsdparsertool/xsd/service/BasicXsdParserService.java`
- [UI model parser](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-uimodel/src/main/java/hu/gov/nav/xsdparsertool/uimodel/service/XmlUiModelParserService.java): `nav-xsd-parser-tool-uimodel/src/main/java/hu/gov/nav/xsdparsertool/uimodel/service/XmlUiModelParserService.java`
- [Form builder](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java): `nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java`
- [XML processing](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/service/DefaultXmlProcessingService.java): `nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/service/DefaultXmlProcessingService.java`
- [XSD validation](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/validation/XsdValidationService.java): `nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/validation/XsdValidationService.java`
- [XPath validation](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xpath/service/XPathValidationOrchestratorService.java): `nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/xpath/service/XPathValidationOrchestratorService.java`

### Administration and resources

- [Template catalog](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-github-updater/src/main/java/hu/gov/nav/xsdparsertool/web/githubupdater/service/GitHubTemplateCatalogService.java): `nav-xsd-parser-tool-github-updater/src/main/java/hu/gov/nav/xsdparsertool/web/githubupdater/service/GitHubTemplateCatalogService.java`
- [Administration](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/api/AdminController.java): `nav-xsd-parser-tool-web/src/main/java/hu/gov/nav/xsdparsertool/web/api/AdminController.java`
- **Application database**

### NAV submission

- [M2M submission](https://github.com/nav-gov-hu/m2m-xml-editor/blob/main/nav-xsd-parser-tool-m2m-submitter/src/main/java/hu/nav/m2m/submitter/service/SubmissionService.java): `nav-xsd-parser-tool-m2m-submitter/src/main/java/hu/nav/m2m/submitter/service/SubmissionService.java`
- **NAV M2M service**

### Other components

- **Editor user**

## Connections

- Editor user → Web application: opens editor
- Web application → XML files: opens XML
- XML files → Schema registry: resolves schema
- Schema registry → XSD parser: supplies XSD
- Schema registry → UI model parser: supplies UI model
- XSD parser → Form builder: defines structure
- UI model parser → Form builder: guides form (evidence: `nav-xsd-parser-tool-processing/src/main/java/hu/gov/nav/xsdparsertool/processing/form/DefaultFormDefinitionBuilderService.java`)
- Form builder → Web application: renders form
- Web application → XML processing: edits XML
- Web application → XSD validation: runs XSD checks
- Web application → XPath validation: runs XPath checks
- Web application → Large XML handling: previews large files
- Web application → Multiform documents: handles form parts
- Web application → Print views: creates print view
- Web application → XML versioning: creates versions
- Web application → Template catalog: manages templates
- Web application → Administration: administers settings
- Web application → M2M submission: submits documents
- M2M submission → NAV M2M service: sends submission
- M2M submission → Application database: tracks status
