xsd-validator
Advanced tools
| MIT License | ||
| Copyright (c) 2021 Innodata Labs | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Metadata-Version: 2.1 | ||
| Name: xsd-validator | ||
| Version: 0.0.2 | ||
| Summary: Validates XML file against XSD, supporting XSD versionj 1.1 | ||
| Home-page: https://github.com/innodatalabs/xsd-validator | ||
| Author: Mike Kroutikov | ||
| Author-email: mkroutikov@innodata.com | ||
| License: MIT | ||
| Platform: UNKNOWN | ||
| Classifier: Development Status :: 4 - Beta | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: License :: OSI Approved :: MIT License | ||
| Classifier: Operating System :: OS Independent | ||
| Requires-Python: >=3.6 | ||
| Description-Content-Type: text/markdown | ||
| # xsd_validator | ||
|  | ||
|  | ||
| Validates an XML file against XSDs, supports XSD version 1.1. Requires Java Runtime (version 8 or better). | ||
| ## API | ||
| Assert that `my.xml` is valid according to schema `schema.xsd`: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd') | ||
| validator.assert_valid('my.xml') | ||
| ``` | ||
| A more complex schema may be split between several files, for example: `schema.xsd`, `schema-aux.xsd` and `xml.xsd`. | ||
| Just pass them all to the `XsdValidator`: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd', 'schema-aux.xsd', 'xml.xsd') | ||
| validator.assert_valid('my.xml') | ||
| ``` | ||
| Sometimes you need to get all problems discovered. You can loop through the errors like this: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd', 'schema-aux.xsd', 'xml.xsd') | ||
| for err in validator('my.xml'): | ||
| print(err) | ||
| ``` | ||
| ## CLI | ||
| You can use `xsd_validator` module as an executable, like this: | ||
| ```bash | ||
| python -m xsd_validator | ||
| ``` | ||
| For example: | ||
| ```bash | ||
| python -m xsd_validator schema.xsd my.xml | ||
| ``` | ||
| Help: | ||
| ```bash | ||
| python -m xsd_validator -husage: xsd_validator [-h] xsd [xsd ...] xml | ||
| Validate an XML file againsd XSD schema (supports XSD version 1.1) | ||
| positional arguments: | ||
| xsd XSD files | ||
| xml XML file to check | ||
| optional arguments: | ||
| -h, --help show this help message and exit | ||
| ``` | ||
| xsd_validator/__init__.py,sha256=9wH8CGmNtp1cDA7CJ-gm7GW9KOoyb95wsjzpZiJ6QRE,1847 | ||
| xsd_validator/__main__.py,sha256=9ZpuJUIvZOJ1hjenEATzUBmtuG_bdp_jUSrKs3PzRBo,514 | ||
| xsd_validator/resources/com.innodata.XsdValidator.jar,sha256=cvXSFwcCELXcNipjXTw5BuJb5hiIQ5eCAP__hdOP5N0,2117007 | ||
| xsd_validator/resources/org.eclipse.wst.xml.xpath2.processor_1.2.0.jar,sha256=_Af-ULngoL8ldy26YG99LCKz8ihf0qFAi7szNWxSHVI,559933 | ||
| xsd_validator/test/__init__.py,sha256=z5v1rx_DBfMI37OXL09fQsHToSH-VNQ5-IOr4tE3Crg,93 | ||
| xsd_validator/test/test_xsd_validator.py,sha256=HmtG2ZeKOnQtstTpx7kDcczJ1Vn6NWTrfS3FasFAlds,739 | ||
| xsd_validator-0.0.2.dist-info/LICENSE,sha256=JzFPT42f44YvyAGx0r0CmDrC7EA7_nG-lrkSeeMAiGw,1070 | ||
| xsd_validator-0.0.2.dist-info/METADATA,sha256=a67-JRMrulzjrqKHDqJf6wgiK-7kKSOmZt2wDdUaPbg,2277 | ||
| xsd_validator-0.0.2.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92 | ||
| xsd_validator-0.0.2.dist-info/top_level.txt,sha256=k7S90s7JgERVqim6FPUtsrwJH-pzRqz9i5RwibjlWN0,14 | ||
| xsd_validator-0.0.2.dist-info/RECORD,, |
| xsd_validator |
| Wheel-Version: 1.0 | ||
| Generator: bdist_wheel (0.36.2) | ||
| Root-Is-Purelib: true | ||
| Tag: py3-none-any | ||
Sorry, the diff of this file is not supported yet
| MIT License | ||
| Copyright (c) 2021 Innodata Labs | ||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Metadata-Version: 2.1 | ||
| Name: xsd-validator | ||
| Version: 0.0.1 | ||
| Summary: Validates XML file against XSD, supporting XSD versionj 1.1 | ||
| Home-page: https://github.com/innodatalabs/xsd-validator | ||
| Author: Mike Kroutikov | ||
| Author-email: mkroutikov@innodata.com | ||
| License: MIT | ||
| Platform: UNKNOWN | ||
| Classifier: Development Status :: 4 - Beta | ||
| Classifier: Intended Audience :: Developers | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
| Classifier: Programming Language :: Python :: 3.7 | ||
| Classifier: Programming Language :: Python :: 3.8 | ||
| Classifier: Programming Language :: Python :: 3.9 | ||
| Classifier: License :: OSI Approved :: MIT License | ||
| Classifier: Operating System :: OS Independent | ||
| Requires-Python: >=3.6 | ||
| Description-Content-Type: text/markdown | ||
| # xsd_validator | ||
| Validates an XML file against XSDs, supports XSD version 1.1. Requires Java Runtime. | ||
| ## API | ||
| Assert that `my.xml` is valid according to schema `schema.xsd`: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd') | ||
| validator.assert_valid('my.xml') | ||
| ``` | ||
| A more complex schema may be split between several files, for example: `schema.xsd`, `schema-aux.xsd` and `xml.xsd`. | ||
| Just pass them all to the `XsdValidator`: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd', 'schema-aux.xsd', 'xml.xsd') | ||
| validator.assert_valid('my.xml') | ||
| ``` | ||
| Sometimes you need to get all problems discovered. You can loop through the errors like this: | ||
| ```python | ||
| from xsd_validator import XsdValidator | ||
| validator = XsdValidator('schema.xsd', 'schema-aux.xsd', 'xml.xsd') | ||
| for err in validator('my.xml'): | ||
| print(err) | ||
| ``` | ||
| ## CLI | ||
| You can use `xsd_validator` module as an executable, like this: | ||
| ```bash | ||
| python -m xsd_validator | ||
| ``` | ||
| For example: | ||
| ```bash | ||
| python -m xsd_validator schema.xsd my.xml | ||
| ``` | ||
| Help: | ||
| ```bash | ||
| python -m xsd_validator -husage: xsd_validator [-h] xsd [xsd ...] xml | ||
| Validate an XML file againsd XSD schema (supports XSD version 1.1) | ||
| positional arguments: | ||
| xsd XSD files | ||
| xml XML file to check | ||
| optional arguments: | ||
| -h, --help show this help message and exit | ||
| ``` | ||
| xsd_validator/__init__.py,sha256=9wH8CGmNtp1cDA7CJ-gm7GW9KOoyb95wsjzpZiJ6QRE,1847 | ||
| xsd_validator/__main__.py,sha256=9ZpuJUIvZOJ1hjenEATzUBmtuG_bdp_jUSrKs3PzRBo,514 | ||
| xsd_validator/resources/com.innodata.XsdValidator.jar,sha256=UtiNUJuCmnTTJ__I_53nFAN-KWDOP5reBhnsSHotnMo,2117006 | ||
| xsd_validator/test/__init__.py,sha256=z5v1rx_DBfMI37OXL09fQsHToSH-VNQ5-IOr4tE3Crg,93 | ||
| xsd_validator/test/test_xsd_validator.py,sha256=HmtG2ZeKOnQtstTpx7kDcczJ1Vn6NWTrfS3FasFAlds,739 | ||
| xsd_validator-0.0.1.dist-info/LICENSE,sha256=JzFPT42f44YvyAGx0r0CmDrC7EA7_nG-lrkSeeMAiGw,1070 | ||
| xsd_validator-0.0.1.dist-info/METADATA,sha256=8lFNFhjaGhQVjw0t3796hg4odwtLH3K5ZW90zIrmpKc,2093 | ||
| xsd_validator-0.0.1.dist-info/WHEEL,sha256=OqRkF0eY5GHssMorFjlbTIq072vpHpF60fIQA6lS9xA,92 | ||
| xsd_validator-0.0.1.dist-info/top_level.txt,sha256=k7S90s7JgERVqim6FPUtsrwJH-pzRqz9i5RwibjlWN0,14 | ||
| xsd_validator-0.0.1.dist-info/RECORD,, |
| xsd_validator |
| Wheel-Version: 1.0 | ||
| Generator: bdist_wheel (0.36.2) | ||
| Root-Is-Purelib: true | ||
| Tag: py3-none-any | ||
Sorry, the diff of this file is not supported yet
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
2684588
26.37%11
10%