Directory folder in xml format

Hi,
I can create a directory in json and post it with success (in EHRBase) but I cannot write one in xml that works. Does anyone have a xml directory folder to share ?
I made several unsuccessful attempts at guessing the right format starting from the json one and from the directory response when using get folder in xml format.

Did you try generating XMLs in the openEHR toolkit?

https://toolkit.cabolabs.com/

I did not. I’ll try it thanks

Unfortunately it seems that the free version does not allow it "Your current plan doesn’t include generating instances for FOLDER. You can upgrade your plan from the menu on the left. "

Yes, some types are constrained. COMPOSITIONs are free.

You can also use the CLI from the open source openEHR SDK GitHub - CaboLabs/openEHR-SDK: Java/Groovy Support of openEHR Operational Templates, Reference Model, Data Generators and other tools for www.CaboLabs.com projects

It has generators for all the types, though it requires some setup.

Hope that helps.

1 Like

Might be a bit, late but there are example folders in the ehrbase openEHR SDK test data.
As the format is not part of the data model, you can just retrieve your working json example as xml.

1 Like

not too late but unfortunately even the simple xml folder listed there does not pass. The error with EHRBase 2.11 is:

<?xml version='1.0' encoding='UTF-8'?>

Bad RequestContent is not allowed in prolog.

and I have no hidden leading characters before “<?xml etc” nor special characters in the file. The file is saved as UTF-8 without BOM.

Accept Header : wrong??