realrolfje / anonimatron

Anonimatron. Providing GDPR compliance since 2010.
https://realrolfje.github.io/anonimatron/
MIT License
105 stars 51 forks source link

How to anonymise data within XML files using Anonimatrion #186

Open S-Norb opened 1 year ago

S-Norb commented 1 year ago

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

realrolfje commented 1 year ago

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.

S-Norb commented 1 year ago

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