Same xmlns multiple times inside the same element

Viewed 50

I'm struggling to find an example like the following:

<myElement>
   <child xmlns="sameNamespace" color="blue"/>
   <child xmlns="sameNamespace" color="red"/>
</myElement>

Can the exact same xmlns appear more than once in a case like this?

1 Answers

Yes, different (or the same) default namespaces can be declared on different elements.

In your posted example, both child elements are in the sameNamespace namespace, and myElement is in no namespace.

Related