I hope your day where you are is as sunny as mine!
I would like to pick your brains to come up with the best solution to a problem I have just been given.
About 3 months ago I created a work flow that got an xml document (we’ll call this XML_Orig), read, analysed and acted upon. This is quite a bulky flow (took me two weeks too complete it) It happily processes 100s of XML everyday.
I have now been asked to add another source of XMLs (we’ll call this XML_New) to process in the same way as XML_Orig. Both XMLs contain the same data with the same structure, but they have different namespaces.
These are the options I can think of:
- duplicate the work flow, in the new work flow, go in an change every XPath node and any other node required.
- Change the namspace of XML_New to match XML_Orig before the work flow.
- Strip out the namespaces of both XMLs, change all the XPath nodes etc.
These are my thoughts on the different options:
- this is an easy fix, but then anytime something has to be changed it needs to be changed twice, it feels like ‘future errors’ is written all over it, and am I creating more work for me (and my work mates) in the long run?
- I haven’t be able to do this in Knime, and anyway, it just doesn’t seem like a good solution.
- I was taught that stripping namespaces out of XML should not be done. But, this seems like the solution I should go for. I can foresee in x months time I get another XML file with a different namespace, if that happened a) I already have the component to strip namespaces and b) I don’t have to change the flow. But, once again despite looking search for how to do this, I am still unable too.
Please can you comment on the options I have have given and if you have other solutions please, please, please let me know.