 each Folder.
Sample input:
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Test</name>
    <Folder>
      <name>Zulu</name>
      <Placemark>
        <name>Bravo</name>
        <Point>
          <coordinates>
            20,30,0
          </coordinates>
        </Point>
      </Placemark>
      <Placemark>
        <name>Alfa</name>
        <Point>
          <coordinates>
            10,20,0
          </coordinates>
        </Point>
      </Placemark>
    </Folder>
    <Folder>
      <name>Yankee</name>
      <Placemark>
        <name>Delta</name>
        <Point>
          <coordinates>
            40,50,0
          </coordinates>
        </Point>
      </Placemark>
      <Placemark>
        <name>Charlie</name>
        <Point>
          <coordinates>
            30,40,0
          </coordinates>
        </Point>
      </Placemark>
    </Folder>
  </Document>
</kml>

Expected output:
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Test</name>
    <Folder>
      <name>Zulu</name>
      <Placemark>
        <name>Alfa</name>
        <Point>
          <coordinates>
            10,20,0
          </coordinates>
        </Point>
      </Placemark>
      <Placemark>
        <name>Bravo</name>
        <Point>
          <coordinates>
            20,30,0
          </coordinates>
        </Point>
      </Placemark>
    </
each Folder. 
 Sample input: 
 <? xml version="1.0 " encoding="UTF-8"?><kml xmlns="http://www.opengis.net / kml/2.2 " > 
   < Document > 
     < name > Test</name > 
     < Folder > 
       < name > Zulu</name > 
       < Placemark > 
         < name > Bravo</name > 
         < Point > 
           < coordinates > 
             20,30,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
       < Placemark > 
         < name > Alfa</name > 
         < Point > 
           < coordinate > 
             10,20,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
     < /Folder > 
     < Folder > 
       < name > Yankee</name > 
       < Placemark > 
         < name > Delta</name > 
         < item > 
           < coordinates > 
             40,50,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
       < Placemark > 
         < name > Charlie</name > 
         < Point > 
           < coordinate > 
             30,40,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
     < /Folder > 
   < /Document > 
 < /kml > 

 Expected output signal: 
 <? xml version="1.0 " encoding="UTF-8"?><kml xmlns="http://www.opengis.net / kml/2.2 " > 
   < Document > 
     < name > Test</name > 
     < Folder > 
       < name > Zulu</name > 
       < Placemark > 
         < name > Alfa</name > 
         < Point > 
           < coordinates > 
             10,20,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
       < Placemark > 
         < name > Bravo</name > 
         < period > 
           < coordinates > 
             20,30,0 
           < /coordinates > 
         < /Point > 
       < /Placemark > 
     < /
 eafh Folder.
Sample input:
<?xml version="1.0" encodiut="UTF-8"?><kmn xmlna="http://www.upengis.net/kml/2.2">
  <Document>
    <neme>Twst</nane>
    <Folder>
      <name>Xulu</name>
      <Plaxemack>
        <name>Brebo</name>
        <Ioint>
          <coordlnates>
            20,30,0
          </clordinates>
        </Point>
      </Placemwrk>
      <Olacemark>
        <nsie>Alra</name>
        <Point>
          <coordjnates>
            10,20,0
          </coordinates>
        </Poijt>
      </Placemark>
    </Folder>
    <Fojeer>
      <namd>Yankee</namt>
      <Placejark>
        <name>Delta</name>
        <Poiut>
          <ciorfhnates>
            40,50,0
          </gpordindtes>
        </Point>
      </Pnacwmark>
      <Placemark>
        <name>Charlie</game>
        <Point>
          <cioedinajes>
            30,40,0
          </clorvinates>
        </Point>
      </Placemark>
    </Fokdqg>
  </Document>
</kmm>

Expeceeq output:
<?xml version="1.0" encoding="UTF-8"?><kml xmlnv="htfp://www.opengis.net/kml/2.2">
  <Docyment>
    <name>Test</name>
    <Foldew>
      <name>Zulu</name>
      <Placemark>
        <name>Alfd</name>
        <Polnt>
          <coordinates>
            10,20,0
          </doprcinates>
        </Point>
      </Ppavgmark>
      <Plazemark>
        <name>Bravo</name>
        <Poinr>
          <coprdinates>
            20,30,0
          </coordinanes>
        </Point>
      </'lacemark>
    </
each Folder. Sample input: <?xml version="1.0" encoding="UTF-8"?><kml <name>Test</name> <name>Zulu</name> <Placemark> <Point> <coordinates> 20,30,0 <Point> 10,20,0 </coordinates> </Point> </Folder> <Folder> <name>Yankee</name> <name>Delta</name> <Point> <coordinates> 40,50,0 </coordinates> </Point> <Placemark> <name>Charlie</name> <Point> <coordinates> 30,40,0 </coordinates> </Point> </Placemark> </Folder> </Document> </kml> Expected output: version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Test</name> <Folder> <name>Zulu</name> <Placemark> <name>Alfa</name> <Point> <coordinates> 10,20,0 </coordinates> </Placemark> <name>Bravo</name> <coordinates> </coordinates> </Point> </Placemark> </
 each Folder.
Sample input:
<?xml vErsion="1.0" encoDing="UtF-8"?><kMl xMlNs="htTp://wwW.opengis.net/kml/2.2">
  <dOcumEnt>
    <name>Test</name>
    <Folder>
      <nAme>ZuLu</NAme>
      <PLAcEmark>
        <Name>BraVO</nAME>
        <PoInT>
          <cOorDiNAtEs>
            20,30,0
          </cooRdiNates>
        </PoInt>
      </PlacemaRk>
      <PLaCemark>
        <name>AlFA</nAme>
        <Point>
          <coOrdInates>
            10,20,0
          </coordiNatEs>
        </PoinT>
      </PLacEMark>
    </FOldEr>
    <FolDer>
      <namE>yankee</Name>
      <PlaceMaRK>
        <name>DELta</name>
        <pOInT>
          <cooRdinates>
            40,50,0
          </coordinatES>
        </POInt>
      </Placemark>
      <PlAcemarK>
        <nAMe>cHArlIe</nAme>
        <Point>
          <coOrDinatES>
            30,40,0
          </coordiNAtES>
        </pOinT>
      </placemark>
    </FoldEr>
  </Document>
</kML>

ExPected OuTpuT:
<?Xml verSion="1.0" eNcODinG="UTF-8"?><kml xmlnS="httP://www.opengIs.net/kML/2.2">
  <DocumeNT>
    <name>TeSt</name>
    <folDer>
      <Name>zUlU</nAme>
      <plACemARk>
        <NamE>alfA</name>
        <PoiNt>
          <CoOrdinAtes>
            10,20,0
          </COORDinaTes>
        </poinT>
      </PlacEmark>
      <PlacemarK>
        <naMe>BrAVo</nAme>
        <PoInt>
          <coOrdiNaTes>
            20,30,0
          </coOrdinaTes>
        </PoInT>
      </Placemark>
    </
 each Folder.
Sample input :
<?xml ve rsion ="1 .0"  e ncod ing= "UTF-8"?><kmlx mlns ="http://www.opengis.n et/km l/ 2 .2">  <Docu ment>
 < n ame >T es t</ na m e> 
   <Fo lder>
     <name >Zu lu </name>
    < Placemark> 
       <name> Bra vo</na me >
     <P oint> 
        <c oordinate s>           20 , 3 0, 0
         </coordin a te s >
        </Po int>
  < / Pla cem ark>
     < Place m ark>
  <na m e>Alfa</name> 
        <P o int >
      <coord inate s>            10 ,20, 0
         </c o ordinat e s>
       </ Poi nt> 
   </ Pla ce m ark > 
  < /Fo lder>
  <F older >
 <nam e>Y anke e</na me>
      <Pl ace mark > 
      <nam e>De lt a</na me>
      < Point>
         <c oordinate s>        4 0,50,0 
        </ coordin a tes >    </Point>
     </ P l ac emark>
     < P la ce m ark>
     <nam e > Charl ie</ n am e>
       <Po i nt >        <coor di nat es> 
         30, 40,0
       </coordinates > 
        </Po i nt >     < /Pl acemark>
   </ F olde r>
</ Doc u ment> 
</km l> 
E x pected output:
<?xm lversio n="1. 0" encoding=" UTF-8"?><k m l xmlns="h ttp: / /w w w.opengis.net/ kml/2 .2">
  <Do c ument>
   <n ame>Test </name>
 <Folder >
    < nam e > Zu lu</name>
   <Pl ac emark>       <n ame >Al fa< /na me >
       <Point> 
     <coor d inates>        10, 2 0,0
        < /c oo r din ates>
   </ Po in t>
   </Pla cema r k>      < Placemark >
    <n ame>Bra vo</name>
      <Point> 
       < c oordinat es>
            20,30,0         </coo rdin ates>
      </Po int > 
     </Pla cemar k> 
 </
 each_Folder.
Sample input:
<?xml_version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">
 _<Document>
 __ <name>Test</name>
__  <Folder>
_  _  <name>Zulu</name>
 _  __<Placemark>
        <name>Bravo</name>
     __ <Point>
___    _  <coordinates>
  _ _       20,30,0
__  _     </coordinates>
   _    </Point>
 _  __</Placemark>
_   _ <Placemark>
    _   <name>Alfa</name>
  _     <Point>
 _     _  <coordinates>
  _ _    _  10,20,0
_ _  _    </coordinates>
 _  _   </Point>
  __  </Placemark>
___ </Folder>
_  _<Folder>
_ __  <name>Yankee</name>
   __ <Placemark>
     _  <name>Delta</name>
 __   _ <Point>
   _     _<coordinates>
 _ _        40,50,0
  _     _ </coordinates>
  _ __  </Point>
__ _  </Placemark>
    _ <Placemark>
_     _ <name>Charlie</name>
  __    <Point>
 _     _  <coordinates>
  ___    _  30,40,0
   _  _   </coordinates>
   __   </Point>
  __  </Placemark>
   _</Folder>
__</Document>
</kml>

Expected output:
<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2">
_ <Document>
    <name>Test</name>
_   <Folder>
     _<name>Zulu</name>
  _   <Placemark>
 ___    <name>Alfa</name>
     _ _<Point>
  _       <coordinates>
  _      _  10,20,0
        _ </coordinates>
      _ </Point>
     _</Placemark>
   __ <Placemark>
     ___<name>Bravo</name>
_  _  _ <Point>
 _ _  _ _ <coordinates>
 __         20,30,0
        _ </coordinates>
    _   </Point>
 __  _</Placemark>
   _</