Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / April 2007

Tip: Looking for answers? Try searching our database.

Removing xmlns attribute from response XML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rajiv - 03 Apr 2007 16:14 GMT
Hi,

I have a webservices(developed in .net 2.0, using c#) with a webmethod that
returns a XML document. The problem is that the XML returned from the
webservice is having a attribute xmlns="" in the root node. It seems that
.net framework is adding this attribute as I have not adding this attribute
through my code.

Is it possible to remove this attribut from the response XML? I know can be
possible to remove it at the client side, but I would like to know if it can
be done at webservice level.

Thanks & Regards,
Rajiv
John Saunders - 03 Apr 2007 22:21 GMT
> Hi,
>
[quoted text clipped - 11 lines]
> can
> be done at webservice level.

Rajiv, "xmlns" isn't really an attribute. It's a namespace declaration. It
indicates that the root element, and any children of the root unless they
override it, is in the
blank namespace.

Is this causing you a problem?

John
Rajiv - 04 Apr 2007 04:12 GMT
Thanks for the reply, John. Yes, the blank namespace declaration in the root
element is causing the problem on the client side. The client to my
webservice is Oracle PL/SQL and they seems to having problem with the blank
namespace(Not quite sure about the exact problem as another team is working
on the client part).

Best Regards,
Rajiv

> > Hi,
> >
[quoted text clipped - 20 lines]
>
> John
John Saunders - 04 Apr 2007 18:37 GMT
> Thanks for the reply, John. Yes, the blank namespace declaration in the
> root
[quoted text clipped - 4 lines]
> working
> on the client part).

You should check with the other team to find the specific problem. It's
possible that the problem is that the namespace declaration needs to be
non-blank!

John
Rajiv - 05 Apr 2007 05:36 GMT
Thanks again for the reply. Yes, you are right. The problem was with the
blank namespace. Now, I am by sending some text in xmlns attribute and it
seems to be working OK.

Best Regards,

> > Thanks for the reply, John. Yes, the blank namespace declaration in the
> > root
[quoted text clipped - 10 lines]
>
> John

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.