Com\’è dura la professione!

6 dicembre 2015

Replicating XML Elements

Filed under: Open Source,QT,qxmledit,xml — lbell @ 18:06
Tags:

It is possible cloning or assigning unique indexes to elements in QXmlEdit 0.9.2 using two new menu items:
Tools > Fill Serie and Tools > Clone.

Applying an index is possible using Fill Serie. An attribute will be used on the siblings of the selected element. The value of the index can be a padded or unpadded number or alpha sequence giving birth to series like “AA”, “AB”, … or “A”, “B”, … and so on.
There are options to skip or replace existing values in the elements as well to merge the values. A non existing attribute can also be created.
The index can be applied recursively to the children of the selected element.

fill options

Cloning elements is a matter to select a sample element and apply the clone command. Only elements can be cloned unless they are the root of the XML. The cloning can be deep, that is applied recursively to the children too or only to the selected element.
An index can be applied in the process. QXmlEdit suggest you to use it if the option has not been selected.

clone options

The final result is shown in the next image.

 

cloning results

Crea un sito o un blog gratuitamente presso WordPress.com.