Create a GUI from a XML schema automatically

后端 未结 7 1667
情深已故
情深已故 2021-02-01 23:47

I have to write a desktop application to edit data stored in a XML file. The format is defined by a XML schema file (.xsd). The format is quite complex.

Are there tools

相关标签:
7条回答
  • 2021-02-02 00:24

    There is an experimental tool, which does that, automatically create a desktop UI for handling data stored in XML. It's called KXForms. It comes as part of a suite of tools for handling XML data in various ways, like creating C++ code from an XML schema to represent the data natively in C++ and encapsulate parsing and writing.

    This might not be the production-ready solution you are looking for, but it's a start and a source for inspiration. It's open source, so contributions are certainly welcome.

    0 讨论(0)
  • 2021-02-02 00:28

    Go For PyQt:

    http://www.riverbankcomputing.co.uk/software/pyqt/download

    Download The Qt Developers tool to generate the gui automatically

    www.qtsoftware.com/products/developer-tools

    For schema validation try lxml

    http://lxml.de/validation.html

    0 讨论(0)
  • 2021-02-02 00:33

    I'm not exactly sure if I can be completely of help to you @Adrian, but I've been researching something very close to what you are discussing...

    Using something like Linq to XML may assist you in the validation of the data being entered, as there are already methods that will validate the data for you.

    As I recall, there are a few tools that allow you dynamically create the app... link

    Hope this helps.

    0 讨论(0)
  • 2021-02-02 00:39

    "XAmple XML Editor project introduces a java Swing based XML editor that analyzes a given schema and then generates a document-specific graphical user interface. Unlike other XML editors, the XAmple XML editor GUI exposes not just a tree representation of the XML document but rather a logical combination of the XML document and respective XML Schema. The user interface of the XML editor is highly logical and intuitively comprehensible. To be able to prepare valid XML documents of significant complexity, a user is not required to be familiar with XML and XML Schema languages and to have any a-priori knowledge about the documents structural requirements."

    I've tried it and even my non-technical boss likes it. You can use it as-is or use it as a library upon which to base your own Java-based UI.

    0 讨论(0)
  • 2021-02-02 00:40

    One solution could be to write an XSL transformation that converts the XML file into a XAML file.

    0 讨论(0)
  • 2021-02-02 00:42

    If the GUI will be simple and you don't bother about the geometry of the components(widgets) in the dialogs, Qt will be a good option. Actually I'm working on a similar task for my project, and my goal was to validate the form data by using an XML file.

    Using Qt, it is possible to access any widget on the dialog at run-time by using its object name. So that validation can be applied to the dialog contents.

    Creating any dialogs will be even easier, since you will have the widget type and certain information and using layouts, fascinating results can be obtained.

    0 讨论(0)
提交回复
热议问题