wood burning stoves 2.0*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Question on default namespace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Question on default namespace" Watch "Question on default namespace" New topic

Question on default namespace

Balaji Natarajan

Joined: Dec 05, 2002
Posts: 28
Assume an xml instance as below

<purchaseorder name="testBook"



In the above instance, what will be namespace for the <order> and <numofpages> elements??

will numofpages belong to the namespace "book" as it is nested inside that??
Harsha Jay
Ranch Hand

Joined: Jul 23, 2001
Posts: 177
From looking at your instance document;

<order> belongs to default namespace thats straightforward.

<numofpages> also belongs to the default namespace.

if the <bookdetails> was declared as follows, the <numofpages> element would certainly belong to the 'book' namespace.

<bookdetails xmlns="http://www.sample.book.com/book">

Others can verify this also...

Balaji Natarajan

Joined: Dec 05, 2002
Posts: 28
Hi Harsha

Thanks for your response. I got your point

I agree. Here's the link: http://aspose.com/file-tools
subject: Question on default namespace
Similar Threads
namespace and targetnamespace
Differences between targetNamespace and default namespace
URI syntax in namespace
How to make .NET/AXIS Client add namespace to soap message elements
Confused in XML Schema.