Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-27-2009, 02:44 PM   PM User | #1
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
simple namespace question

Consider an element <aaa> that contains <bbb>, in the following 3 examples:

Code:
<aaa xmlns="http:www.whatever.com">
  <bbb />
</aaa>
Code:
<root xmlns:x="http:www.whatever.com">
  <x:aaa>
    <x:bbb />
  </x:aaa>
</root>
Code:
<root xmlns:x="http:www.whatever.com">
  <x:aaa>
    <bbb />
  </x:aaa>
</root>
I know that in the first two examples, both <aaa> and <bbb> are part of the namespace x but is <bbb> part of x in the third example?
__________________
Die Welt ist ein Irrenhaus und hier ist die Zentrale!
mlse is offline   Reply With Quote
Old 01-27-2009, 04:41 PM   PM User | #2
angst
Senior Coder

 
angst's Avatar
 
Join Date: Apr 2004
Location: Toronto, Ontario
Posts: 2,112
Thanks: 15
Thanked 122 Times in 122 Posts
angst is on a distinguished road
not 100% sure, but I would think that <bbb/> would still be a child of the x node.
angst is offline   Reply With Quote
Old 01-28-2009, 07:03 AM   PM User | #3
Alex Vincent
Moderator


 
Join Date: May 2002
Location: Hayward, CA
Posts: 1,427
Thanks: 1
Thanked 19 Times in 17 Posts
Alex Vincent is on a distinguished road
No. bbb in the third case lives in the default namespace, which is not specified in the root element.
__________________
"The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
June 30, 2001
author, Verbosio prototype XML Editor
author, JavaScript Developer's Dictionary
https://alexvincent.us/blog
Alex Vincent is offline   Reply With Quote
Users who have thanked Alex Vincent for this post:
mlse (01-30-2009)
Old 01-30-2009, 02:01 PM   PM User | #4
mlse
Regular Coder

 
mlse's Avatar
 
Join Date: Mar 2005
Posts: 624
Thanks: 20
Thanked 19 Times in 18 Posts
mlse is on a distinguished road
Thanks Alex, I suspected that that was the case!
__________________
Die Welt ist ein Irrenhaus und hier ist die Zentrale!
mlse is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26 PM.


Advertisement
Log in to turn off these ads.