Skip to content

feat(working-with-solutionxml-elements): add 34 compiler-validated C# examples - Working With Solutionxml Elements [26.8.0/net8.0] - #100

Merged
amjad-sahi merged 41 commits into
mainfrom
feat/examples-working-with-solutionxml-elements-20260829
Aug 29, 2026
Merged

feat(working-with-solutionxml-elements): add 34 compiler-validated C# examples - Working With Solutionxml Elements [26.8.0/net8.0]#100
amjad-sahi merged 41 commits into
mainfrom
feat/examples-working-with-solutionxml-elements-20260829

Conversation

@agent-aspose-diagram-examples

Copy link
Copy Markdown
Collaborator

Working With Solutionxml Elements — Compiler-Validated C# Examples

What this PR does

Adds 34 AI-generated, compiler-validated C# examples for the Working With Solutionxml Elements category of Aspose.Diagram for .NET.

All examples were generated by the Aspose.Diagram Examples Generator Agent and passed the full three-attempt validation pipeline before being included.

Validation Summary

Check Result
dotnet build ✅ Passed — zero compiler errors
dotnet run ✅ Passed — clean execution
Aspose.Diagram Version 26.8.0
Target Framework net8.0
Examples Added 34

Pipeline

Each example was generated and validated through:

  1. Attempt 1 — MCP direct code retrieval and assembly
  2. Attempt 2 — MCP retrieval with injected API correction rules
  3. Attempt 3 — LLM repair pass with compiler errors and rules

Only examples that passed both dotnet build and dotnet run are included in this PR.

Examples Added

File Task Description
add-a-custom-data-row-to-a-specific-shape-within-the-solutionxml-and-update-the-file.cs Add a custom data row to a specific shape within the solutionxml and update the file
add-a-hyperlink-element-to-a-shape-in-the-solutionxml-and-define-its-target-url.cs Add a hyperlink element to a shape in the solutionxml and define its target url
apply-a-conditional-formatting-rule-in-the-solutionxml-that-highlights-shapes-based-on-data-values.cs Apply a conditional formatting rule in the solutionxml that highlights shapes based on data values
apply-a-security-policy-that-removes-all-external-references-from-the-solutionxml-before-distribution.cs Apply a security policy that removes all external references from the solutionxml before distribution
apply-a-transformation-xslt-to-the-solutionxml-to-generate-a-custom-shape-properties-report.cs Apply a transformation xslt to the solutionxml to generate a custom shape properties report
batch-process-a-folder-of-visio-files-updating-each-solutionxml-to-include-a-timestamp-attribute.cs Batch process a folder of visio files updating each solutionxml to include a timestamp attribute
clone-an-existing-shape-node-in-the-solutionxml-and-reposition-the-duplicate-on-the-same-page.cs Clone an existing shape node in the solutionxml and reposition the duplicate on the same page
compare-two-solutionxml-files-to-identify-added-removed-or-modified-shapes-between-versions.cs Compare two solutionxml files to identify added removed or modified shapes between versions
compress-the-solutionxml-content-using-gzip-before-embedding-it-into-a-vsdx-package.cs Compress the solutionxml content using gzip before embedding it into a vsdx package
create-a-custom-xml-namespace-mapping-for-solutionxml-to-avoid-naming-collisions-with-other-schemas.cs Create a custom xml namespace mapping for solutionxml to avoid naming collisions with other schemas
create-a-new-page-node-in-the-solutionxml-and-assign-a-background-style.cs Create a new page node in the solutionxml and assign a background style
create-a-reusable-function-that-injects-a-predefined-style-sheet-into-any-solutionxml-document.cs Create a reusable function that injects a predefined style sheet into any solutionxml document
decrypt-an-encrypted-solutionxml-segment-with-a-provided-key-and-verify-its-integrity.cs Decrypt an encrypted solutionxml segment with a provided key and verify its integrity
export-the-solutionxml-to-a-formatted-json-file-for-easier-consumption-by-web-services.cs Export the solutionxml to a formatted json file for easier consumption by web services
extract-all-custom-data-sections-from-the-solutionxml-and-export-them-to-a-csv-file.cs Extract all custom data sections from the solutionxml and export them to a csv file
generate-a-summary-report-of-shape-counts-per-page-by-analyzing-the-solutionxml-hierarchy.cs Generate a summary report of shape counts per page by analyzing the solutionxml hierarchy
generate-a-thumbnail-image-from-the-solutionxml-by-rendering-the-first-page-at-low-resolution.cs Generate a thumbnail image from the solutionxml by rendering the first page at low resolution
implement-a-version-control-system-that-stores-incremental-solutionxml-changes-as-separate-diff-files.cs Implement a version control system that stores incremental solutionxml changes as separate diff files
implement-error-handling-to-catch-malformed-solutionxml-nodes-and-log-detailed-diagnostics.cs Implement error handling to catch malformed solutionxml nodes and log detailed diagnostics
import-a-json-representation-of-diagram-elements-and-merge-it-into-the-existing-solutionxml.cs Import a json representation of diagram elements and merge it into the existing solutionxml
integrate-a-third-party-library-to-validate-xml-namespaces-within-the-solutionxml-before-saving.cs Integrate a third party library to validate xml namespaces within the solutionxml before saving
iterate-through-all-connectors-in-the-solutionxml-and-adjust-their-line-weight-uniformly.cs Iterate through all connectors in the solutionxml and adjust their line weight uniformly
load-a-visio-file-and-obtain-its-solutionxml-representation-for-analysis.cs Load a visio file and obtain its solutionxml representation for analysis
optimize-the-solutionxml-size-by-removing-redundant-style-definitions-and-consolidating-identical-elements.cs Optimize the solutionxml size by removing redundant style definitions and consolidating identical elements
parse-the-solutionxml-to-extract-each-shape-s-id-and-corresponding-name.cs Parse the solutionxml to extract each shape s id and corresponding name
remove-all-comments-from-the-solutionxml-document-to-clean-up-metadata-before-saving.cs Remove all comments from the solutionxml document to clean up metadata before saving
remove-orphaned-shape-references-from-the-solutionxml-to-prevent-rendering-errors.cs Remove orphaned shape references from the solutionxml to prevent rendering errors
replace-all-instances-of-a-specific-font-name-in-the-solutionxml-with-a-new-font.cs Replace all instances of a specific font name in the solutionxml with a new font
search-the-solutionxml-for-shapes-containing-a-specific-keyword-and-list-their-ids.cs Search the solutionxml for shapes containing a specific keyword and list their ids
serialize-the-modified-solutionxml-back-into-the-original-vsdx-package-while-preserving-all-resources.cs Serialize the modified solutionxml back into the original vsdx package while preserving all resources
set-a-custom-document-level-property-in-the-solutionxml-for-version-tracking.cs Set a custom document level property in the solutionxml for version tracking
update-page-dimensions-in-the-solutionxml-to-modify-the-diagram-canvas-size-programmatically.cs Update page dimensions in the solutionxml to modify the diagram canvas size programmatically
use-linq-to-xml-for-efficiently-querying-shape-attributes-within-the-solutionxml.cs Use linq to xml for efficiently querying shape attributes within the solutionxml
validate-the-solutionxml-against-the-visio-schema-to-ensure-structural-integrity.cs Validate the solutionxml against the visio schema to ensure structural integrity

Validation Details


This PR was created automatically by the Aspose.Diagram Examples Generator Agent. Merge after reviewing the examples above.

…-a-specific-shape-within-the-solutionxml-and-update-the-file

Task: Add a custom data row to a specific shape within the solutionxml and update the file

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…to-a-shape-in-the-solutionxml-and-define-its-target-url

Task: Add a hyperlink element to a shape in the solutionxml and define its target url

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…atting-rule-in-the-solutionxml-that-highlights-shapes-based-on-data-values

Task: Apply a conditional formatting rule in the solutionxml that highlights shapes based on data values

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…that-removes-all-external-references-from-the-solutionxml-before-distribution

Task: Apply a security policy that removes all external references from the solutionxml before distribution

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…slt-to-the-solutionxml-to-generate-a-custom-shape-properties-report

Task: Apply a transformation xslt to the solutionxml to generate a custom shape properties report

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…f-visio-files-updating-each-solutionxml-to-include-a-timestamp-attribute

Task: Batch process a folder of visio files updating each solutionxml to include a timestamp attribute

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…node-in-the-solutionxml-and-reposition-the-duplicate-on-the-same-page

Task: Clone an existing shape node in the solutionxml and reposition the duplicate on the same page

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…files-to-identify-added-removed-or-modified-shapes-between-versions

Task: Compare two solutionxml files to identify added removed or modified shapes between versions

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-content-using-gzip-before-embedding-it-into-a-vsdx-package

Task: Compress the solutionxml content using gzip before embedding it into a vsdx package

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…space-mapping-for-solutionxml-to-avoid-naming-collisions-with-other-schemas

Task: Create a custom xml namespace mapping for solutionxml to avoid naming collisions with other schemas

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…n-the-solutionxml-and-assign-a-background-style

Task: Create a new page node in the solutionxml and assign a background style

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…on-that-injects-a-predefined-style-sheet-into-any-solutionxml-document

Task: Create a reusable function that injects a predefined style sheet into any solutionxml document

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…utionxml-segment-with-a-provided-key-and-verify-its-integrity

Task: Decrypt an encrypted solutionxml segment with a provided key and verify its integrity

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…o-a-formatted-json-file-for-easier-consumption-by-web-services

Task: Export the solutionxml to a formatted json file for easier consumption by web services

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…sections-from-the-solutionxml-and-export-them-to-a-csv-file

Task: Extract all custom data sections from the solutionxml and export them to a csv file

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…t-of-shape-counts-per-page-by-analyzing-the-solutionxml-hierarchy

Task: Generate a summary report of shape counts per page by analyzing the solutionxml hierarchy

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ge-from-the-solutionxml-by-rendering-the-first-page-at-low-resolution

Task: Generate a thumbnail image from the solutionxml by rendering the first page at low resolution

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…rol-system-that-stores-incremental-solutionxml-changes-as-separate-diff-files

Task: Implement a version control system that stores incremental solutionxml changes as separate diff files

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-to-catch-malformed-solutionxml-nodes-and-log-detailed-diagnostics

Task: Implement error handling to catch malformed solutionxml nodes and log detailed diagnostics

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…tion-of-diagram-elements-and-merge-it-into-the-existing-solutionxml

Task: Import a json representation of diagram elements and merge it into the existing solutionxml

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…library-to-validate-xml-namespaces-within-the-solutionxml-before-saving

Task: Integrate a third party library to validate xml namespaces within the solutionxml before saving

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ectors-in-the-solutionxml-and-adjust-their-line-weight-uniformly

Task: Iterate through all connectors in the solutionxml and adjust their line weight uniformly

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…tain-its-solutionxml-representation-for-analysis

Task: Load a visio file and obtain its solutionxml representation for analysis

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-size-by-removing-redundant-style-definitions-and-consolidating-identical-elements

Task: Optimize the solutionxml size by removing redundant style definitions and consolidating identical elements

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-extract-each-shape-s-id-and-corresponding-name

Task: Parse the solutionxml to extract each shape s id and corresponding name

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-the-solutionxml-document-to-clean-up-metadata-before-saving

Task: Remove all comments from the solutionxml document to clean up metadata before saving

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ferences-from-the-solutionxml-to-prevent-rendering-errors

Task: Remove orphaned shape references from the solutionxml to prevent rendering errors

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-a-specific-font-name-in-the-solutionxml-with-a-new-font

Task: Replace all instances of a specific font name in the solutionxml with a new font

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…or-shapes-containing-a-specific-keyword-and-list-their-ids

Task: Search the solutionxml for shapes containing a specific keyword and list their ids

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…olutionxml-back-into-the-original-vsdx-package-while-preserving-all-resources

Task: Serialize the modified solutionxml back into the original vsdx package while preserving all resources

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…vel-property-in-the-solutionxml-for-version-tracking

Task: Set a custom document level property in the solutionxml for version tracking

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…n-the-solutionxml-to-modify-the-diagram-canvas-size-programmatically

Task: Update page dimensions in the solutionxml to modify the diagram canvas size programmatically

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…ciently-querying-shape-attributes-within-the-solutionxml

Task: Use linq to xml for efficiently querying shape attributes within the solutionxml

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…-against-the-visio-schema-to-ensure-structural-integrity

Task: Validate the solutionxml against the visio schema to ensure structural integrity

- Validated: dotnet build passed
- Validated: dotnet run passed
- Generator: Aspose.Diagram Examples Generator Agent v2.0
- Library: Aspose.Diagram for .NET 26.8.0
- Framework: net8.0
- Pipeline: MCP retrieval → rules injection → LLM repair
…dable example catalogue for Working With Solutionxml Elements category
@amjad-sahi
amjad-sahi merged commit cd66df1 into main Aug 29, 2026
1 check passed
@amjad-sahi
amjad-sahi deleted the feat/examples-working-with-solutionxml-elements-20260829 branch August 29, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants