how can I use xmlschema to produce a tree from my xsd file? #430
Replies: 1 comment
-
Hi, Otherwise xmlschema components structure is a representation of what is defined in multi-schema aggregations (a schema is in fact a collection of schemas, at least one user defined schema and the ones that compose the so called meta-schema). The more useful API for traverse a schema is iter_components() and the components schema property, but actually this accessor doesn't provide useful info for building a graph. This can be extracted from components attributes (e.g. parent or elem) but this has to be clarified before developing something. Maybe a brief description on what it could be the information that have to be extracted from components for building a graph could be useful for building a API for doing that. best regards |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a very xomplex xsd file that describes application specific xml files.
there are many complexities such as groups, inheritences, lists ....
also 5 other xsd files are imported in this main xsd file.
I was wondering if it would be possible to create a tree of allowed hierarchy of tags based on this xsd. I do not have an xml file.
I only have an xsd file it has a root called Dataset.
from there I want to create a tree that shows which tags are allowed to come as direct chidlren of each tag.
I was confused with the documentation.
interchildren() iter_elements() and iter_component() ....
I am not sure how I can create a tree of all possible hierarchy of tags allowed by my xsd.
I think such a thing can be useful for all developer as we need to digest all complexities of xsd files to understand what we should expect from outr xml.
can you please guid me how to do it?
Beta Was this translation helpful? Give feedback.
All reactions