Question Emil Odobasic · Nov 29, 2023

What would be the best way to import a very large XML-file into a production, modifying it depending on certain conditions, and creating a new XML file?

Hello everyone!
Sorry for the vague title! But I wonder what would be the best way to easily import a large XML-file into a production, modifying it by deleting elements and nodes depending on what values are in those nodes/elements and later creating whole new XML-file from that?

I have gone through this: Using Caché XML Tools | Caché & Ensemble 2018.1.4 – 2018.1.8 (intersystems.com)

But I get the sense that there are a lot of ways of approaching this, but I do not know what is the most effective for my certain needs.

I appreciate the help! Thanks beforehand! :)
 

Product version: IRIS 2023.2

Comments

Enrico Parisi · Nov 29, 2023

Hi Emil,
I can think of 3 possible approaches.

1) Use XPATH
2) Modify the XML Document as a DOM
3) Use XSLT transformations

All 3 can be used/implemented in IRIS.

Enrico

P.S.: I suggest using the latest version of the documentation

0
Emil Odobasic  Nov 29, 2023 to Enrico Parisi

Hello Enrico!

I will try your suggenstions!

Thank you very much once again! :)

0
Emil Odobasic  Dec 14, 2023 to Jani Hurskainen

Thanks alot for the help! :)

0
Eduard Lebedyuk · Dec 15, 2023

XSLT unless we are talking about a very large files to be processed very quickly in which case SAX parser might be worth a consideration.

0