The Xml is poorly formed, the code sample uses classes not defined, and there is no mention of what issues that you are having with which line of code.
Here is the XML fixed:
="1.0"="UTF-8"
<a:label
xmlns:a="http://www.myurl.com/a">
<b:title
xmlns:b="http://www.myurl.com/b">
<b:detail>
<b:names>
<b:name>the name</b:name>
<b:colour>blue</b:colour>
</b:names>
<b:attib>
<b:size>A4</b:size>
</b:attib>
</b:detail>
</b:title>
</a:label>
Here is a solution using the above fixed xml:
var rawXml = @"<?xml version=""1.0"" encoding=""UTF-8""?>
<a:label xmlns:a=""http://www.myurl.com/a"">
<b:title xmlns:b=""http://www.myurl.com/b"">
<b:detail>
<b:names>
<b:name>the name</b:name>
<b:colour>blue</b:colour>
</b:names>
<b:attib>
<b:size>A4</b:size>
</b:attib>
</b:detail>
</b:title>
</a:label>";
var input = XDocument.Parse(rawXml);
var output = input.Root.Elements().Elements().First().ToString();
Console.WriteLine(output);
Which outputs:
<b:detail xmlns:b="http://www.myurl.com/b">
<b:names>
<b:name>the name</b:name>
<b:colour>blue</b:colour>
</b:names>
<b:attib>
<b:size>A4</b:size>
</b:attib>
</b:detail>