Hey. I am currently having a problem parsing an Xml string without any namespace and added to an existing XElement with a namespace.
my code is:
XElement elem = root.Element(xs + "methodCall");
if (elem != null)
{
XElement e = XElement.Parse(this.MethodCallXML);
elem.Add(e);
}
result:
<methodCall>
<methodCall service="activity" method="activityDeleteComment" xmlns="">
<espSessionState>espSessionState1</espSessionState>
<traceFlowCode>true</traceFlowCode>
<params>
<commentID>http://uri1</commentID>
<isPermanentDelete>false</isPermanentDelete>
</params>
</methodCall>
</methodCall>
My problem is that xmlns = "" I cannot figure out how to create a node using the parsing method and provide it with a default namespace.
Is there any way to do this?
Kezza source
share