anonimatron icon indicating copy to clipboard operation
anonimatron copied to clipboard

How to anonymise data within XML files using Anonimatrion

Open S-Norb opened this issue 3 years ago • 2 comments

Hello I need to anonymize XML file, I know how to set configuration for anonymizing data in tables, csv files, ... But I don't know how to set configuration to anonymize data in a XML file Can you provide me please the syntax or an example of configuration file for anonymizing data within a xml file Any help is greatly appreciated ? Thanks Norbert

S-Norb avatar Feb 01 '23 08:02 S-Norb

Hello, Anonimatron does not have direct support for XML files. There are a few things you can do however:

  1. Try to transform the xml to csv using xslt and anonymize that file and then transform it back (this looks complicated and may not be the best solution)
  2. Extend/fork Anonimatron to build XML support. Maybe there is a way to have a configuration with xpath pointing to fields which can be anonymized. I haven't thought about this.
  3. Create an XML reader in Java, and use Anonimatron as a dependency in your project.

This all depends on how complicated your XML is, and how generic you want the solution to be. Since the structure of XML documents is not always straightforward, I think it will be quite a challenge to build generic support for it.

I hope this helps a bit.

realrolfje avatar Feb 05 '23 13:02 realrolfje

Hello I thank you a lot for your answer. We know now that it is not possible to natively anonymize data within XML file We are working on another way to get this data anonymized Regards

S-Norb avatar Feb 08 '23 11:02 S-Norb