There are a few problematic things in the code in your first post. Firstly, this line:
MainSource.SelectSingleNode("/ns10:DirectImportDBForm/ns10:Items", ns);
Will return a reference to an XPathNavigator positioned at the ns10:Items node (assuming it exists). It will not change the position of the MainSource variable, which will remain positioned at the document root of the main data source. You need to do something like this:
XPathNavigator mainItems = MainSource.SelectSingleNode("/ns10:DirectImportDBForm/ns10:Items", ns);
Even with that resolved, it looks like your code would only append a single line item inside that else block, and not several if there are several. I'm not positive that it will work, but please try changing this:
if (!SecSource.HasChildren)return;
else
{
SecSource.MoveToChild("LineItem", "");
MainSource.AppendChild(SecSource);
To this:
foreach(XPathNavigator lineItem in SecSource.Select("LineItem"))
{
mainItems.AppendChild(lineItem);
}