example to add xml element using geonetwork api
tp0b opened this issue · 1 comments
Hi everyone,
I am looking for some example to add publication date element in geonetwork using api so that i can run a code to check if existing memetadata records having this element or not. If not, I would like this code to add this element because we want to integrate to get this information updated.
For example, in geonetwork UI I can manually open the record, and choose editing in xml mode and scrolling down to the section of this element and the content of xml element for publication date
the xpath for this information is
.//mdb:identificationInfo/mri:MD_DataIdentification/mri:citation/cit:CI_Citation/cit:date/cit:CI_Date
By looking at geonetwork API documentation, it seems to me that [/{portal}/api/0.1/records/{metadataUuid}/editor/elements] might help, but i don't know how to put ref parameter
Anyone has a working example for this api and would like to share with me, that will be helpful for me
Thank you very much.
Cheers, Thu
ref
references requires to open the record in edit mode (which combines the XML and XSD). May be easier to use batch edit API to update the XML eg. https://docs.geonetwork-opensource.org/4.4/user-guide/workflow/batchediting/