473,396 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Removing xmlns attribute from response XML

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
Apr 3 '07 #1
4 7681
"Rajiv" <Rajiv @discussions.microsoft.comwrote in message
news:81**********************************@microsof t.com...
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.
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
Apr 3 '07 #2
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

"John Saunders" wrote:
"Rajiv" <Rajiv @discussions.microsoft.comwrote in message
news:81**********************************@microsof t.com...
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.

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
Apr 4 '07 #3
"Rajiv" <Ra***@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
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).
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
Apr 4 '07 #4
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,

"John Saunders" wrote:
"Rajiv" <Ra***@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
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).

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
Apr 5 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Matt | last post by:
Hello, I have an XML document similar to the following: <DataItems> <Data xmlns="http://www.me.com"> <DataInformation xmlns:a="http://www.me.com/ASettings" xsi:type="a:Stuff1">...
1
by: Maziar Aflatoun | last post by:
Hello, I have a string variable that contains XML data with many different namespaces. I like to remove all the namespaces from my XML (clean the XML). What's the quickest way to do this? Ex....
11
by: EAI | last post by:
Hi All, I have a XML of the following form <?xml version="1.0"?> <xxxx xmlns="http://xxx.xxx.com"> .... </xxxx> When I try to read xml using SelectSingleNode, I am getting exception
7
by: Simon Hart | last post by:
Hi, I have a requirement to remove the xmlns from the DOM in order to pass over to MS CRM 3.0 Fetch method.It seems the fetch method blows up if there is a xmlns present!?! The reason I have a...
0
by: jts2077 | last post by:
I am trying to create a large nested XML object using E4X methods. The problem is the, the XML I am trying to create can only have xmlns set at the top 2 element levels. Such as: <store ...
6
by: Chris Chiasson | last post by:
Hi, After reading and experimenting for a several hours, I have this stylesheet: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"...
0
by: Abhinay | last post by:
hi, this is abhinay, i have data ie xml file Ex: <root> <child1> <cc1>aaa</cc1> </child1>
0
by: nappingcub | last post by:
This is my first time coding a web service in .NET and ran into a slight snag that I was hoping that anyone could help me out on. I'm using the generic Hello World web service that is stubbed out on...
2
by: MedIt | last post by:
Hi, I am new in using xsl.I am stuck in a simple task,which is trying to remove an atribute from a node,and keep the rest of the attributes of this element in the xslt. I have tried a couple of...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.