Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XML namespaces  RSS feed

 
dinesh pande
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going through the Mz site. It's pretty useful. One of the questions I had regarding XML namespaces is ..

<aaa xmlns="http://aaa.com" xmlns:bn="http://www.bbb.com">
<bn:bbb>
<xyz>Some Test </xyz>
</bn:bbb>
</aaa>

Now the above snippet which namespace does xyz element belong to ?

Thanks..
 
Mikalai Zaikin
Ranch Hand
Posts: 3403
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dinesh pande:
I was going through the Mz site. It's pretty useful. One of the questions I had regarding XML namespaces is ..

<aaa xmlns="http://aaa.com" xmlns:bn="http://www.bbb.com">
<bn:bbb>
<xyz>Some Test </xyz>
</bn:bbb>
</aaa>

Now the above snippet which namespace does xyz element belong to ?

Thanks..


<xyz> - without prefix, therefore belongs to default namespace, which declared as xmlns="http://aaa.com"

regards,
MZ
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!