473,386 Members | 1,602 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,386 software developers and data experts.

XmlNode.OuterXml inserting xmlns attribute

..Net Framework 1.1 Version 1.1.4322 SP1
WinXP SP2
MS Dev Environment 2003 Version 7.1.3088 ( Visual Studio 2003 )

I have an xml document that I only use a portion of. Since the xml document
is not generated by my company, I have no control over whether or not the
extra info is in there. I have written a method that pulls out only the
needed information by looping thru each of the nodes until I find the correct
one and then assigning a string the following value: "node.outerxml". This
works perfectly with one exception: the xmlns that is declared higher up in
the xml document is placed as an attribute into the top node that I've pulled
out.

Example: <root xmlns="somenamespace"><bottom>...</bottom></root>
If I pull out only the outerxml of the element 'bottom', I get the
following: <bottom xmlns="somenamespace">...</bottom>.

Is there a way to stop this from happening? Any help would be greatly
appreciated. Thanks!!!!!!
Nov 17 '05 #1
0 1733

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

Similar topics

1
by: CB | last post by:
I have a group of documents that previously had no schema, now I have a schema, and I want to use XSLT to fixup the documents by inserting the namespace reference. In other words, my input...
4
by: Rune | last post by:
I have two queries that appear to be exactly the same, but one of them returns null while the other one returns a valid result! Can anyone provide an explanation to why this is so? Below is an...
5
by: Paul | last post by:
Here I have the definition of an XmlNode which is a property (PayPreference) on my Customer class containing an enum describing how the customer will pay. <PayPerference...
3
by: Mae | last post by:
Dear All, I have a problem here, I'm using C# Webform calling a webservices. The webservices return me a XMLnode, using this XMLnode I want to convert it to dataset so I can bind to the...
1
by: Marc | last post by:
Hi! I'm working with a C# client that calls a php web service. I've created a wrapper to call the service using .NET wsdl tool (adding a web reference). The call to the server works fine, it...
1
by: PaulF | last post by:
I am writing a web service that accepts and returns an XML message - I know the issues behind this but want to be able to process the messages generically using XSD / XSLT. My problem occurs...
6
by: Vivek | last post by:
Hello, I wish to copy an XmlNode in a string variable from a XmlDocument object. But as I takeout this XmlNode, it adds the NamespaceURI. Why ? Could somebody please help me ? Vivek
5
by: =?Utf-8?B?VGhlIE1hbiBGcm9tIFNRTA==?= | last post by:
I'm having the darndest XML config file problem that I really need help with. I'm supporting a .NET 1.1 desktop application with its own config file, and I implement IConfigurationSectionHandler...
1
by: Andrus | last post by:
How to remove whole Xmlnode so that outer tags are also removed ? To reproduce, run the code. Observed result: <Query> <DataSourceName>DS1</DataSourceName> <QueryParameters>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...

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.