Com\’è dura la professione!

5 gennaio 2015

Anonymizing data with QXmlEdit

Filed under: Open Source,qxmledit,xml — lbell @ 21:10

QXmlEdit 0.8.13 sports a feature to anonymize data inside a XML file.
The menu Tools > Anonymize recalls a dialog to anonymize the data contained in attributes and text of the XML.
This feature can be useful if the XML file should be sent to technical staff for debugging purposes avoiding the disclosure of personal information.
Using this feature the text and the attributes can be altered using a fixed character or using a different letter for each input character by preserving the case of the original letters.
The original data structure is preserved replacing only letters and digits with altered text, preserving the case of the letters and the reserved XML attributes. The tags and attribute names are not changed.
Data and business rules
Often not all the input files contain personal information, but also data for business rules. Modifying all the contained text or attributes will end in a useless file transporting no information at all.
To avoid that result, manipulating the parameters that belong to the business rules, two features can be used:

  • A filter to avoid the anonymization of values consisting of less than 4 characters (the length of many codes).
  • The use of exceptions.

The exceptions can be bound to any element, attribute or text node and force the subject to be anonymized or not; if anonymized, a user defined value can be used to replace the original one.
The exceptions can be hierarchical and extended to the children of the subject. It is possible to isolate data from business rules from personal data. When applying more expressions, the more specific wins; for example if an element has been forced to be anonymized with children, and one of its children has another exception of reverse meaning, the child exception is applied.
Note: at the moment namespaces are not processed in the exception path
Each time an exception is modified, the anonymization operation results are shown in a preview pane. The original values can be seen in the tooltips of the elements of the preview.


Since creating rules and exceptions is a time expensive process, it is possible to save them using a profile and recall them later in other anonymization processes.


The options are:

  • All text: all the text will be changed.
  • Text with more than 3 letters or digit: only the text that is composed by more than 3 letters or digits will be changed. This to skip codes that usually have a limited length.

The check box “fixed pattern” determines how the text is transformed.

  • If checked: letters are replaced by ‘x’ and numbers by ‘1’.
  • If unchecked: the letters and the numbers are replaced by a succession of letters or numbers in alphabetical order.

The exceptions can be entered selecting the element and using the contextual menu.


Information in the panel:

  • Profile Name: name of the profile (read only
  • Options: options to anonymize data:
    • anonymize all the text
    • anonymize only the text with more than 3 letters or numbers
  • Preview: it shows the final result of the operation on the current data.
  • Add Exception: exceptions can be added when an element is selected in the preview.
  • Exceptions: the list of the exceptions.
  • Save Profile: saves the current profile data. If the profile has not been created, a creation panel will appear.
  • Edit Profile: edits the profile data.
  • Profiles: manages the profiles.

To insert an exception:

  1. Select an element in the preview pane
  2. Use one of the buttons in the “Add exception” row

To remove an exception:

  1. Select an exception in the exception list.
  2. Press “Delete” in the exception group.

To save the exception list in a profile:

  • Press “Save profile”

If the profile has not be created, a profile creation panel will appear.
To mange profiles:

  • Press “Profiles…”

A list of profiles, grouped by tags will appear. Selecting a profile and exiting with “Ok” will load the profile in the caller dialog. It is possible also creating and deleting profiles.



1 commento »

  1. Wow! In the end I got a blog from where I be able to in fact
    get useful facts concerning my study and knowledge.

    Commento di finance news updates — 9 dicembre 2017 @ 18:37 | Rispondi

RSS feed for comments on this post. TrackBack URI


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Blog su

%d blogger hanno fatto clic su Mi Piace per questo: