Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7007239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:34:53+00:00 2026-05-27T21:34:53+00:00

What (if any) is the difference between the below xml snippets, with regards to

  • 0

What (if any) is the difference between the below xml snippets, with regards to namespace?

Form1

<prf:XmlElement1 xmlns:prf="namespacename">
   ...snip...
</prf:XmlElement1>

Form2

<XmlElement1 xmlns="namespacename">
   ...snip...
</XmlElement1>

I’m interacting with a web service that chokes on an element when its namespace is described as in Form2, but works fine if the namespace is described as in Form1. Unfortunately, I haven’t been able to convince my web service framework to emit the element like Form1; the best I can get so far is Form2. It seems to me that both forms are correctly specifying the namespace, and that this is probably a bug on the web service’s side.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:34:54+00:00Added an answer on May 27, 2026 at 9:34 pm

    @marc_s already explained in his comment what is the difference.

    Also @JohnSaunders is probably correct in that the service is broken. One possible reason why using a default namespace breaks a document is that the service probably relies on hardcoded namespace prefixes. You can verify this by serving it a document that uses the same namespace but a different prefix than prf (or whatever it always uses). Also note that if you do not declare a namespace for a prefix, make sure that you do not use that prefix anywhere, in element names or attribute names. Using an undeclared prefix renders your document not (namespace) well-formed.

    Also properly functional XML services might depend on fixed namespace prefixes, if the documents are validated with a DTD. Unlike other schema languages, DTD is not namespace aware so handling the namespace declarations is difficult and therefore the location of the declaration and the prefix might be fixed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any difference between the below two snippets? One is a char array,
What is the difference between the 2 lines shown below?: <html xmlns=http://www.w3.org/1999/xhtml xml:lang=en-GB> <meta
Is there any difference between the 2 methods below for calculating c ... specifically
Given that A* pA; and B* pB; , is there ANY difference between below
Is there any difference between these two cases in below program? static void Main(string[]
Just curious, is there any difference between the two ways below for file reading?
Is there any difference between the below declarations? declaration 1 : someName.test1 = function()
Is there any difference between the two pieces of code below? Or is the
Is there any difference in between the two method definitions below? Eclipse does not
Is there any difference between int on_exit(void (*function)(int , void *), void *arg); and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.