• Post Reply Bookmark Topic Watch Topic
  • New Topic

XML namespaces

 
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: 3381
12
  • 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!