Tuesday, April 20, 2010

Merging Multiple XML Files

XStreamingElement mergeElem = new XStreamingElement(rootName,
  from at in FileMergeAttributeStreamAxis(localFiles.First(), rootName) select at,
  from el in FileHeaderStreamAxis(localFiles.First(), mergeName) select el,
  new XStreamingElement(mergeName,
    from at in FileMergeAttributeStreamAxis(localFiles.First(), mergeName) select at,
    from el in FileMergeElementStreamAxis(localFiles, mergeName) select el),
  from el in FileTrailerStreamAxis(localFiles.Last(), mergeName) select el
);
 
 

No comments: