Skip to content

automate extract xml element attribute from xsd file, generate xslt to transform between each other

License

Notifications You must be signed in to change notification settings

ShawnXiha/XmlMapping

Repository files navigation

XML Mapping Tool From XSD TO XSLT

The XML Mapping Tool is a Python package that helps you create mappings between two XML files with different XSD schemas.

Installation

Install dependence lxml

    pip install  lxml 

Usage To use the XML Mapping Tool, run the mapping_tool.py script and provide the paths to the two XSD files:

step1:

generate xslt from xsd schema files

from mapping2xslt import generate_xslt_files
generate_xslt_files('schema1.xsd', 'schema2.xsd', 'schema1_to_schema2.xslt', 'schema2_to_schema1.xslt')

step2:

xml to xml with the xslt generated

from xml2xmlwithxslt import translate_xml
xml_result = translate_xml(xml_string, xslt_file)

About

automate extract xml element attribute from xsd file, generate xslt to transform between each other

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages