Asker
Asker

Reputation: 23

Same xmlns multiple times inside the same element

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?

Upvotes: 2

Views: 146

Answers (1)

kjhughes
kjhughes

Reputation: 111491

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.

Upvotes: 1

Related Questions