0

I want to add screen-overlay in exsisting kml using c#.i have two kml file i merging them when i am going to do so new file contains two and tag is there any way to control this duplicacy ? or there any other way to add screen-overlay in exsisting kml using c#. thanks in advance..to merge i am using -

    FStream1 = File.Open(sFile1, FileMode.Open);
    FStream2 = File.Open(sFile2, FileMode.Open);
    FStream3 = File.Open(sFile3, FileMode.Append);

    byte[] FStream1Content = new byte[FStream1.Length];
    byte[] FStream2Content = new byte[FStream2.Length];
    FStream1.Read(FStream1Content, 0, (int)FStream1.Length);
    FStream2.Read(FStream2Content, 0, (int)FStream2.Length);

    FStream3.Write(FStream1Content, 0, (int)FStream1.Length);
    FStream3.Write(FStream2Content, 0, (int)FStream2.Length);
Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Kratika Sharma
  • 291
  • 1
  • 5
  • 16
  • 2
    This is not *merging*, but a simple concatenation. [KML](https://en.wikipedia.org/wiki/Keyhole_Markup_Language) looks like XML to me, you can [read xml](http://stackoverflow.com/q/4752796/1997232)s and then do merging while removing duplicates. – Sinatr Jun 30 '15 at 11:33
  • thanks Sinatr . i tried this but here another problem that my xml has document tag and i want to add new tag inside it but my new tag is creating after closing documet tag. i tried XmlNode menu = doc.SelectSingleNode("Document"); XmlNode node = doc.CreateNode(XmlNodeType.Element, "ScreenOverlay", null); menu.AppendChild(node); but its giving error – Kratika Sharma Jun 30 '15 at 14:35
  • Sounds like a **new question**. Make sure to include code and error message as well as ask good question (check google first if this question was asked already 100500 times). – Sinatr Jun 30 '15 at 14:52

0 Answers0