Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Attribute().Remove failure
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Vic  
View profile  
 More options Nov 21 2009, 5:00 pm
From: Vic <vic...@liquidcognition.com>
Date: Sat, 21 Nov 2009 14:00:16 -0800 (PST)
Local: Sat, Nov 21 2009 5:00 pm
Subject: Attribute().Remove failure
I think anyone could run this code and see the problem. On the last
line, if you look at the content of the xB object in your debugger,
you'll see the "xmlns" attribute, even though it's removed in the
previous command. I've tried variations on this idea, like a while
(xB.Attribute("xmlns") != null). Can anyone tell me why the "xmlns"
attribute is not removed from this object?

xBlog is an <asp:Xml> object on the page. This code is in the
Page_Load event in a ASP.Net app using the 3.5 framework.

HttpWebRequest req = (HttpWebRequest)WebRequest.Create(@"http://
charliescowboyblog.blogspot.com/feeds/posts/default");
HttpWebResponse response = (HttpWebResponse)req.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
XElement xB = XElement.Parse(reader.ReadToEnd());
response.Close();
reader.Close();
xB.Attribute("xmlns").Remove();
xBlog.DocumentContent = xB.ToString();


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Cerebrus  
View profile  
 More options Nov 23 2009, 12:59 pm
From: Cerebrus <zorg...@sify.com>
Date: Mon, 23 Nov 2009 09:59:28 -0800 (PST)
Local: Mon, Nov 23 2009 12:59 pm
Subject: Re: Attribute().Remove failure
An "xmlns" attribute is not a normal attribute. It is parsed as an
XNamespace, so cannot be removed so simply.

You could use something like the code in the following article to
remove the Namespace, however:
http://tinyurl.com/yc52d9z

On Nov 22, 3:00 am, Vic <vic...@liquidcognition.com> wrote:


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google