Skip to content

A speedy solution for developers who need to work with YANG data models derived from XML schemas.

Notifications You must be signed in to change notification settings

carolinestanly/xml_to_yang_convertor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XML TO Yang Convertor

Accelerate your YANG model development process with XML to YANG Convertor - the lightning-fast and intuitive XML to YANG conversion tool. It's the ultimate conversion tool for simplifying network management.

FeaturesInstallationConfigurationsRoadmapAcknowledgment

Features

  • Fast conversion of XML schemas to YANG models.
  • Configurable module name, namespace, prefix, and revision.
  • Exporting YANG models to file.
  • Dynamically creates container, leaf, and list elements.
  • Automatically Extracts attributes and their values from XML files and creates YANG objects.
  • Adds description and key statements to container and list elements respectively dynamically.

Installation

Requirements

  • A modern operating system (macOS, Windows, Linux, or ARM64)
  • libxml2 and glib development packages installed
  • A C compiler (e.g., GCC, Clang, or MSVC)

macOS

  1. Install libxml2 and glib using Homebrew:
brew install libxml2 glib
  1. Clone the repository and navigate to the project directory:
git clone https://github.com/carolinestanly/xml_to_yang_convertor.git
cd xml_to_yang_convertor

Windows

  1. Install MSYS2.

  2. Open MSYS2 terminal and update the package database and base packages:

pacman -Syu
  1. Close the terminal and reopen it.

  2. Install required libraries:

pacman -S mingw-w64-x86_64-libxml2 mingw-w64-x86_64-glib2
  1. Clone the repository and navigate to the project directory:
git clone https://github.com/carolinestanly/xml_to_yang_convertor.git
cd xml_to_yang_convertor

Linux and ARM64

  1. Install libxml2 and glib development packages:
sudo apt-get install libxml2-dev libglib2.0-dev

2.Clone the repository and navigate to the project directory:

git clone https://github.com/carolinestanly/xml_to_yang_convertor.git
cd xml_to_yang_convertor

Compilation

To compile the project using the provided Makefile, run:

make clean
make

Running the convertor

Modify the input and output path. Execute the execute.sh script to run the convertor with the specified input XML file and output directory:

./execute.sh

Configurations

S.No Name Description
1 name Module name of the YANG.Match the YANG module name with the file name to ensure consistency.
2 namespace An unique identifier for YANG modules.
3 prefix Short label to reference a YANG module's namespace.
4 revision The version number assigned to YANG modules to track changes made over time.

Roadmap

  • Improved error handling and reporting
  • Grouping of the YANG nodes.
  • Enable Dual XML Migration followed by YANG Conversion.
  • Validates the output yang after conversion
  • Compare XSD and XML to enable YANG conversion.

Acknowledgement

About

A speedy solution for developers who need to work with YANG data models derived from XML schemas.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published