On Thu, Oct 6, 2011 at 12:57 PM, Roan Kattouw <roan.kattouw@gmail.com> wrote:
On Thu, Oct 6, 2011 at 1:11 AM, Nicolas Vervelle <nvervelle@gmail.com> wrote:
> Hi,
> Is it normal that a namespace has been added to the XML answer of the API
> with MW 1.18 ?
Someone requested this on Bugzilla and I implemented it.

> I was quite busy lately, so I may have missed the announcement about this.
> It means that answers from MW 1.18 are not compatible with answers from
> previous versions.
How does it mean this, exactly?

Hi, thanks for answers.

 Well, I'm using XPath in Java to find informations in the XML answer.
Unless I missed something, I think I have to change a lot of things, and can't have my tool compatible with both 1.17 and 1.18.

Previously, when there was no namespace in the answer, I was using the XPath search path "/api/login" to analyse the result of login (in <api><login>)
With the added namespace, this search path doesn't return anything because it doesn't match the namespace.

I have to add a definition for this namespace (for example, telling Java that "api" is equivalent to the added namespace), and change the XPath search path to "/api:api/api:login" to analyse the result of login.
I have to change all XPath search pathes for every API request that I'm doing in my code.
And this new XPath search pathes doesn't work for Wikipedia before 1.18.

So, I have a lot of modifications to make so that my tool works with 1.18, and it won't be compatible anymore with 1.17 or earlier.

Nico