Xml Trouble

Does anyone know why it is adding name space here for no good reason into middle of the Xml document ?

I have never had this issue before so I am sure I am doing something wrong somewhere.

This code here is adding the ja-JP line in the XML bellow

localeNode = NewLocalesNode.OwnerDocument.CreateElement(“locale”)

As you can see the line was added but…………. it has this namespace line there as well

da de el zh-CHT nl-BE ja-JP


perhaps the others are in the “default” namespace, and Japan is not?

Japan is the one I am adding, I wanted to add it so it is just like the others. So if Japan is not in the default namespace there, then I guess the question would be how I add it in correct one so it comes like the others.


I think that it is adding it for you… hence the extra data you are aseeing

maybe is related to https://forum.xojo.com/13838-xmldocument-createelement-always-adds-namespace/0#p111071
but I can not replicate the problem

I think your correct there Antonio,

Its same with me I cannot replicate the problem just by making other project.

The link you posted seems to hint that it adds it once. As far as I can see then the XML file that I am trying to add to does not have such node at top, maybe that is why it is trying to add it.