Skip to content

Tool for XML/TypeScript components configuration for automatic form generation

License

Notifications You must be signed in to change notification settings

FedericaPaoli1/XmlCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License


Logo

XmlCompiler

XML/TypeScript components configuration for automatic form generation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact

About The Project

XmlCompiler is a project developed for the bachelor's thesis at the University of Florence (academic year 2018-2019). XmlCompiler is a Web App that allows you to compile Xml files, or create new ones, by providing an interface that acts as a link between the operations carried out on the file system and the data entered by you in order to create a new Xml file or modify an existing one. It does not receive any specific input data, but it can generate the corresponding XML file by feeding it any parameter.

Built With

Getting Started

Prerequisites

Installation

  1. Clone the repo
    git clone https://github.com/FedericaPaoli1/XmlCompiler.git
  2. Run the application on a browser

Usage

  • Starting from the homepage of the app, it will be possible to make three choices, located to the top right of the navigation bar.

Screenshot 1




  • By clicking on the first button, "Entities", we will be redirected to the page containing the list of all the Xml files contained in the file system, relating to the Entity file type. This type of file constitutes the elements displayed in the interface.

Screenshot 2


Screenshot 3




  • By clicking on the second button, "Searches", we will be redirected to the page containing the list of all the Xml files contained in the file system, relating to the Search file type. This type of file represents the filters with which searches are carried out, at interface level, on Entities

Screenshot 4


Screenshot 5




  • Clicking on the "Create" button, it will take you to a page where you can choose between the two types of file to be created.

Screenshot 6


Screenshot 7




  • Selecting one of the two buttons, e.g. the first one, "Create a new search", it will open a page allowing you to insert the Element, i.e. the one that will be the root and the name of the Xml file.

Screenshot 8


Screenshot 9




  • If we try to type the word "prova" as the Element text, we will see that the "save", "new attributes" and "new fields" buttons are enabled and becoming brighter in colour.

Screenshot 10




  • There is also a "reset" button. This allows you to delete the text you have written, restoring the initial text box. If, for example, you write "provaaa" and then realise that you have written something wrong or that you would like to change, you can click on the "reset" button so that you can write the correct word.

Screenshot 11


Screenshot 12


Screenshot 13




  • After entering the correct word as Element text, clicking on "save", it will open a confirmation window. It will then be possible to confirm the inserted element and create an Xml file with only the presence of what has been entered, i.e. only the root, or it will be possible to continue inserting further elements, i.e. attributes and/or fields.

Screenshot 14


Screenshot 15




  • If you choose to continue inserting more, click on the red button marked "No, I want to continue inserting attributes and fields".

Screenshot 16




  • At this point, clicking on the "New attributes" button to insert new attributes it will open a new window allowing you to enter the key and value of a new attribute.

Screenshot 18




  • As an example, we will enter "attributo1" as the key and "uno" as the value of our new attribute.

Screenshot 19




  • You can also add more than one attribute by clicking on the "+" button at the top of the window.

Screenshot 20




  • Two more text boxes will be provided, one for entering the key and another for entering the value of the new attribute.

Screenshot 21




  • When inserting a new attribute with key "attributo3" and value "tre", we realise that it is not the attribute we want. You can therefore delete it by clicking on the eraser button.

Screenshot 22


Screenshot 23




  • By clicking on the "+" button again, we will enter the right attribute in the empty boxes.

Screenshot 24




  • We can now save the entered attributes and proceed to insert the fields by clicking on the "New fields" button.

Screenshot 25


Screenshot 26




  • Again, a dialogue box will allow new fields to be entered using the same buttons.

Screenshot 27




  • We will insert the first field named "campo1", with the identifier of the group to which "campi" belongs.

Screenshot 28




  • In addition, by clicking on the "Add option" button, it will be possible to enter additional characteristics of the field, which define whether it is a read-only field, visible or mandatory.

Screenshot 29




  • When one or more elements are not selected, it means that, being Boolean values, they will appear in the Xml file with the false value, vice-versa they will appear with the true value.

Screenshot 30




  • We will select the "Read-only" element in this case.

Screenshot 31


Screenshot 32




  • If you wish, you can add another field with the name "campo2" and group id "campi" and save it.

Screenshot 33




  • Once we have filled in what we need to create the Xml file, we can click on the "yes and save" button in the confirmation window. Once saved, in the file system, in this case, in the XmlCompiler/XmlFiles/Searches/ directory, the file prova.xml will appear and we will be redirected to the list of all Xml files relating to Searches, which currently also contains the file "prova". Here we can edit or delete the file.

Screenshot 34




  • By clicking on the "Update" button, a window for updating attributes or fields will be presented.

Screenshot 35


Screenshot 36




  • By selecting "Update attributes", it will be possible to write the key of an attribute whose value we would like to change, or write a new attribute to add to the attributes of the "prova" file, by clicking on the "New update" button.

Screenshot 37


Screenshot 38




  • As in the case of creation, it will be possible to remove incorrect or unwanted attributes and, once the necessary changes have been made, it will be possible to save.

Screenshot 39




  • The same can be done by clicking on "Update fields". You will have the possibility to write the name of a field whose group identifier or options you want to change by clicking on the button "More options" button.

Screenshot 40


Screenshot 41


Screenshot 42




  • The options are the same as for creation and have the same rules for selection or not. New fields can also be added by clicking on the "New update" button.

Screenshot 43




  • To close the different windows, you can click on the "X" button or directly on the "save" button.

Screenshot 44




  • If you want to delete the Xml file from the file system, you will be able to click on the "delete" button, deleting it from both the list and the file system.

Screenshot 45


Screenshot 46


Screenshot 47




License

Distributed under the MIT License. See LICENSE for more information.

Contact

Federica Paoli' - federicapaoli1@gmail.com

Project Link: https://github.com/FedericaPaoli1/XmlCompiler