
Research
/Security News
Contagious Interview Campaign Escalates With 67 Malicious npm Packages and New Malware Loader
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Generates XML documents based on XSD schemas with the ability to customize data through a YAML configuration file.
Simplifies the creation of test or demonstration XML data for complex schemas.
pip install xmlgenerator
curl -LO https://github.com/lexakimov/xmlgenerator/releases/download/v0.5.3/xmlgenerator-linux-amd64
chmod +x xmlgenerator-linux-amd64
sudo install xmlgenerator-linux-amd64 /usr/local/bin/xmlgenerator
# also available: zsh, tcsh
xmlgenerator -C bash | sudo tee /etc/bash_completion.d/xmlgenerator
The generator command is xmlgenerator
Flags and parameters:
usage: xmlgenerator [-h] [-c <config.yml>] [-o <output.xml>] [-p] [-v <validation>] [-ff] [-e <encoding>] [-s <seed>]
[-d] [-V] [-C <shell>]
xsd [xsd ...]
Generates XML documents from XSD schemas
positional arguments:
xsd paths to xsd schema(s) or directory with xsd schemas
options:
-h, --help show this help message and exit
-c, --config <config.yml> pass a YAML configuration file
-o, --output <output.xml> save the output to a directory or file
-p, --pretty prettify the output XML
-v, --validation <validation> validate the generated XML document (none, schema, schematron; default: schema)
-ff, --fail-fast terminate execution on a validation error (default: true)
-e, --encoding <encoding> the output XML encoding (utf-8, windows-1251; default: utf-8)
-s, --seed <seed> set the randomization seed
-d, --debug enable debug mode
-V, --version show the current version
-C, --completion <shell> print a shell completion script (bash, zsh, tcsh)
Examples:
Generate XML from a single schema and print to console:
xmlgenerator path/to/your/schema.xsd
Generate XML from all schemas in a directory and save to the output
folder using a configuration file:
xmlgenerator -c config.yml -o output/ path/to/schemas/
Generate XML from a specific schema, save to a file with pretty formatting and windows-1251 encoding:
xmlgenerator -o output.xml -p -e windows-1251 path/to/your/schema.xsd
Generate XML with validation disabled:
xmlgenerator -v none path/to/your/schema.xsd
The generator can be configured using a YAML file passed via the -c
or --config
option.
Description and examples of configuration are in CONFIGURATION.
Generated XML documents are checked for conformance against the schema used for generation. By default, validation against the source XSD schema is used.
If a document does not conform to the schema, execution stops immediately.
This behavior can be disabled using the flag -ff false
or --fail-fast false
.
To disable validation, use the flag -v none
or --validation none
.
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Clone the repository:
git clone https://github.com/lexakimov/xmlgenerator.git
cd xmlgenerator
Create and activate a virtual environment (recommended):
python -m venv .venv
source .venv/bin/activate
.\.venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
4.1. Install the package:
pip install .
# or for development mode (code changes will be immediately reflected)
# pip install -e .
4.2. Otherwise, build single executable:
python build_native.py
xmlgenerator/
- main project codetests/
- testspytest
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or issues, please contact [lex.akimov23@gmail.com].
You can also create an Issue on GitHub to report bugs or suggest improvements.
FAQs
Generates XML documents from XSD schemas
We found that xmlgenerator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.