miaozn / xsd2xml Goto Github PK
View Code? Open in Web Editor NEWa python lightweight xml generator from a xsd
License: MIT License
a python lightweight xml generator from a xsd
License: MIT License
With 3.7 I get:
~/.software/xsd2xml> ./xsd2xml.py
Traceback (most recent call last):
File "./xsd2xml.py", line 4, in <module>
import xmlschema
ImportError: No module named xmlschema
Hello, Zach!
I tried to use your tool and it seems to work fine. One problem that I had was detecting which version of xmlschema I need to get installed. At the moment it's
xmlschema==0.9.14
Can you please add it to requirements.txt
or to a setup.py
?
Hello, I have started using your xsd2xml tool (special thanks for your work), more specifically the updated branch from @seregagl, and I have encountered two main issues (being the second the one the most important, for which I have yet to find a fix). Since I am completely new to XSD syntax, they may sound simple and banal, for which I apologize.
None[0]
. The following XSD attribute was the one causing the issue, although I am unsure why, since it was correctly validated by other XSD-checkers.<xs:attribute name="match_edge">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="full">
</xs:enumeration>
<xs:enumeration value="start">
</xs:enumeration>
<xs:enumeration value="end">
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:element name="FILES">
<xs:complexType>
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element name="FILE" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="filename" type="xs:string" use="required">
</xs:attribute>
</xs:complexType>
</xs:element>
<FILES>
<FILE>
</FILE>
</FILES>
Other attributes from were correctly saved to the output XML, although in this case they were defined in a common space, instead of being directly specified within the said main XSD.
<xs:complexType name="NameType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="label" use="optional" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<TAG label="String">String</PRIMARY_ID>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.