Com\’è dura la professione!

22 dicembre 2010

Explore a XML file structure with QXmlEdit

Filed under: Open Source,QT,qxmledit,xml — lbell @ 22:08
Tags: , ,

One of QXmlEdit peculiar characteristics is the possibility to change the quantity and the type of informations shown on a XML file to examine it from various prospectives.

If the XML file is very large and complex it happens to focus on some details missing the big picture. Let us take for example a Qt user interface file, we can face the following situation:


 

it is very difficult, at least for me, to follow the widgets’s structure or differentiate between them. As a first help we can activate a display style that can list in the space reserved to element tag name, the value of one or more attributes that can characterize the element itself. The predefined style provided with QXmlEdit installer displays near to the element tag, the value of ‘name’, ‘id’ or ‘build’ attributes, if any. The styles can be created and installed by the end users; they can be applied using the ‘paint can’ icon button at the bottom right of the data tree.


The style makes the visualization more intuitive and the data structure stand out very quickly.

 

To solve the problem of seeing the element text together with his tag, we can activate the compact view visualization as shown in the following screenshot. The text, if present and if no attributes exist, appears in the column reserved to the attributes with a different color.


 

We can have an overview of the XML file while maintaining the desired level of detail.


Crea un sito o un blog gratuito su WordPress.com.