Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <WindowBuilderProject>
- <stringtable>
- <stentry>0..607</stentry> //All of the other records
- <stentry>
- <index>608</index>
- <sid>MNUB_AUTO</sid>
- <val>
- <en>AUTO</en>
- </val>
- <params>
- <fontref>0</fontref>
- <numref>0</numref>
- <clip>FALSE</clip>
- <include>TRUE</include>
- <protected>FALSE</protected>
- <cwidth>-1</cwidth>
- <dwidth>0</dwidth>
- </params>
- </stentry>
- </stringtable>
- </WindowBuilderProject>
- string location = "/WindowBuilderProject/stringtable/stentry[index='" + rowIndexOfItemUnderMouseToDrop + "']";
- XmlNode Copy = xDoc.ImportNode(xDoc2.SelectSingleNode(location), false);
- xDoc.DocumentElement.AppendChild(Copy); //This is just supposed to add it to the end, I will worry about ordering once it works
- var xDoc1 = XDocument.Load("C:\text1.xml");
- var xDoc2 = XDocument.Load("C:\text2.xml");
- var doc1Entries = xDoc1.Descendants("stentry");
- var cloneEntries = doc1Entries.Select(x => new XElement(x));
- xDoc2.Descendants("stentry").Last().AddAfterSelf(cloneEntries);
- xDoc2.Save("C:\text2.xml");
- var filterIndices = new[] {600, 601, 700, 705};
- var doc1Entries =
- xDoc1.Descendants("stentry")
- .Where(x =>
- filterIndices.Contains(int.Parse(x.Element("index").Value)));
Add Comment
Please, Sign In to add comment