If I have an XElement that has child elements, and if I remove a child element from the parent, removing all references between the two, will the child XElement have the same namespaces as the parent?
In other words, if I have the following XML:
<parent xmlns:foo='abc'> <foo:child /> </parent>
and I remove the child element, will the child element’s xml look like
<child xmlns='abc' />
or like
<child />
The answer is yes, namespaces do propagate to children.
You do NOT have to specify the namespace within child elements. The scoping of a namespace includes all elements until the closing tag of the element it was defined in.
See section #6.1 here http://www.w3.org/TR/REC-xml-names/#scoping
hope that helps