XmlNode.OuterXml inserting xmlns attribute
- From: Tom S. <Tom S.@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 May 2005 15:24:02 -0700
..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!!!!!!
.
- Prev by Date: Re: Question about interface
- Next by Date: How to check if CLASS implements an interface?
- Previous by thread: Converting VB 6 to C#
- Next by thread: How to check if CLASS implements an interface?
- Index(es):
Relevant Pages
|