views:

15

answers:

1

Hello All,

We are struggling with some namespace compatibility issues. Currently we store some external data in our database as XML files with namespace as xmlns="http://xyz.com/prodresponse/v2", recently the vendor has changed the namesspace to xmlns="http://xyz.com/prodresponse/v4".

The issue is we need to deal with both old and new namespace data seamlessly for our internal application purpose. I do see only one option at the momemnt:

  1. Run a SQL script to convert existing xml data's from version v2 to v4.

Any other options?

Many thanks in advance

+2  A: 

The reason why the namespace changed is probably because the format has changed. Therefore, the namespace is very valuable information to you, as it tells you exactly what elements to expect and not to expect (when coupled with the corresponding XSD schema). The old XML data might very well be incorrect according to the schema if you update the namespace to the new version.

So no, I don't think you should change your existing XML data. Keep it, and make sure your parser knows how to handle both namespaces.

driis