title: PHP creating XML is inserting extra tags and extraneous data. Help?
body: <p>I'm trying to import XML data from an excel spreadsheet (saved as an 'XML Spreadsheet 2003').  The PHP script reads the excel data, and then transposes the data to an external XML file.  This new file, in turn is read by a javscript to place markers on a google map using the google map API.  I know this is inefficient, but the goal is to give the client a spreadsheet they can easily edit and upload, and have those changes reflected on the site without any intervention from me.</p>
  
  <p>The issues are as follows:</p>
  
  <ul>
  <li>The script duplicates the last excel
  entry twice (creating 3 xml entries
  of the same data)</li>
  <li>The cells which    contain numbers
  have extra zeros    placed in the
  middle of the number (excel does this)</li>
  <li>The header row of the excel file is<br>
  being included in the XML, despite my
  attempt otherwise</li>
  <li>The URL attribute    of the XML
  should be blank if it is    not
  provided, but the xml reads 'URL'</li>
  </ul>
  
  <p>Screenshot of Excel showing how data is entered:<br>
  Correction, no images for noobs like me.  Click for a screen shot: <a href="http://i.stack.imgur.com/D0pgS.jpg" rel="nofollow">screenshot</a>
  <br><br>
  Source of Excel XML spreadsheet (I included all of it in case I'm missing something):</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;?mso-application progid="Excel.Sheet"?&gt;
  &lt;Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
   xmlns:o="urn:schemas-microsoft-com:office:office"
   xmlns:x="urn:schemas-microsoft-com:office:excel"
   xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
   xmlns:html="http://www.w3.org/TR/REC-html40"&gt;
   &lt;DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"&gt;
    &lt;Author&gt;Brandon&lt;/Author&gt;
    &lt;LastAuthor&gt;Brandon&lt;/LastAuthor&gt;
    &lt;Created&gt;2011-04-01T21:05:56Z&lt;/Created&gt;
    &lt;Version&gt;14.00&lt;/Version&gt;
   &lt;/DocumentProperties&gt;
   &lt;OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"&gt;
    &lt;AllowPNG/&gt;
   &lt;/OfficeDocumentSettings&gt;
   &lt;ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"&gt;
    &lt;WindowHeight&gt;7995&lt;/WindowHeight&gt;
    &lt;WindowWidth&gt;20115&lt;/WindowWidth&gt;
    &lt;WindowTopX&gt;240&lt;/WindowTopX&gt;
    &lt;WindowTopY&gt;75&lt;/WindowTopY&gt;
    &lt;ProtectStructure&gt;False&lt;/ProtectStructure&gt;
    &lt;ProtectWindows&gt;False&lt;/ProtectWindows&gt;
   &lt;/ExcelWorkbook&gt;
   &lt;Styles&gt;
    &lt;Style ss:ID="Default" ss:Name="Normal"&gt;
     &lt;Alignment ss:Vertical="Bottom"/&gt;
     &lt;Borders/&gt;
     &lt;Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="11" ss:Color="#000000"/&gt;
     &lt;Interior/&gt;
     &lt;NumberFormat/&gt;
     &lt;Protection/&gt;
    &lt;/Style&gt;
    &lt;Style ss:ID="s62"&gt;
     &lt;Font ss:FontName="Arial" x:Family="Swiss" ss:Bold="1"/&gt;
    &lt;/Style&gt;
   &lt;/Styles&gt;
   &lt;Worksheet ss:Name="Sheet1"&gt;
    &lt;Table ss:ExpandedColumnCount="9" ss:ExpandedRowCount="4" x:FullColumns="1"
     x:FullRows="1" ss:DefaultRowHeight="15"&gt;
     &lt;Column ss:AutoFitWidth="0" ss:Width="86.25"/&gt;
     &lt;Column ss:AutoFitWidth="0" ss:Width="128.25"/&gt;
     &lt;Column ss:AutoFitWidth="0" ss:Width="156.75"/&gt;
     &lt;Column ss:AutoFitWidth="0" ss:Width="112.5"/&gt;
     &lt;Column ss:AutoFitWidth="0" ss:Width="103.5"/&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Lat&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Long&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Name&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Phone&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Address&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;City&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;State&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Zip&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;URL&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.769831000000003&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.972657&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Generic Liquors&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5555&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;42 Walnut St&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;80207&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.763903999999997&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.966311&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Fancy Restaurant&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5556&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;55 Colfax Drive&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;80207&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.759087000000001&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.982963&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Even Fancier Restaurant&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5557&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;1129 Boggio St&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;87505&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
    &lt;/Table&gt;
    &lt;WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"&gt;
     &lt;PageSetup&gt;
      &lt;Header x:Margin="0.3"/&gt;
      &lt;Footer x:Margin="0.3"/&gt;
      &lt;PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/&gt;
     &lt;/PageSetup&gt;
     &lt;Unsynced/&gt;
     &lt;Selected/&gt;
     &lt;Panes&gt;
      &lt;Pane&gt;
       &lt;Number&gt;3&lt;/Number&gt;
       &lt;ActiveRow&gt;4&lt;/ActiveRow&gt;
       &lt;ActiveCol&gt;4&lt;/ActiveCol&gt;
      &lt;/Pane&gt;
     &lt;/Panes&gt;
     &lt;ProtectObjects&gt;False&lt;/ProtectObjects&gt;
     &lt;ProtectScenarios&gt;False&lt;/ProtectScenarios&gt;
    &lt;/WorksheetOptions&gt;
   &lt;/Worksheet&gt;
   &lt;Worksheet ss:Name="Sheet2"&gt;
    &lt;Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
     x:FullRows="1" ss:DefaultRowHeight="15"&gt;
     &lt;Row ss:AutoFitHeight="0"/&gt;
    &lt;/Table&gt;
    &lt;WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"&gt;
     &lt;PageSetup&gt;
      &lt;Header x:Margin="0.3"/&gt;
      &lt;Footer x:Margin="0.3"/&gt;
      &lt;PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/&gt;
     &lt;/PageSetup&gt;
     &lt;Unsynced/&gt;
     &lt;ProtectObjects&gt;False&lt;/ProtectObjects&gt;
     &lt;ProtectScenarios&gt;False&lt;/ProtectScenarios&gt;
    &lt;/WorksheetOptions&gt;
   &lt;/Worksheet&gt;
   &lt;Worksheet ss:Name="Sheet3"&gt;
    &lt;Table ss:ExpandedColumnCount="1" ss:ExpandedRowCount="1" x:FullColumns="1"
     x:FullRows="1" ss:DefaultRowHeight="15"&gt;
     &lt;Row ss:AutoFitHeight="0"/&gt;
    &lt;/Table&gt;
    &lt;WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"&gt;
     &lt;PageSetup&gt;
      &lt;Header x:Margin="0.3"/&gt;
      &lt;Footer x:Margin="0.3"/&gt;
      &lt;PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/&gt;
     &lt;/PageSetup&gt;
     &lt;Unsynced/&gt;
     &lt;ProtectObjects&gt;False&lt;/ProtectObjects&gt;
     &lt;ProtectScenarios&gt;False&lt;/ProtectScenarios&gt;
    &lt;/WorksheetOptions&gt;
   &lt;/Worksheet&gt;
  &lt;/Workbook&gt;
  </code></pre>
  
  <p>Excel XML source of just the relevant cell data:</p>
  
  <pre><code>&lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Lat&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Long&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Name&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Phone&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Address&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;City&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;State&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;Zip&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell ss:StyleID="s62"&gt;&lt;Data ss:Type="String"&gt;URL&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.769831000000003&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.972657&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Generic Liquors&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5555&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;42 Walnut St&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;80207&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.763903999999997&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.966311&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Fancy Restaurant&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5556&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;55 Colfax Drive&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;80207&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
     &lt;Row ss:AutoFitHeight="0"&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;39.759087000000001&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;-104.982963&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Even Fancier Restaurant&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;555-123-5557&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;1129 Boggio St&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;Denver&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="String"&gt;CO&lt;/Data&gt;&lt;/Cell&gt;
      &lt;Cell&gt;&lt;Data ss:Type="Number"&gt;87505&lt;/Data&gt;&lt;/Cell&gt;
     &lt;/Row&gt;
  </code></pre>
  
  <p>PHP Script:</p>
  
  <pre><code>&lt;?php
  //
  // Read the Excel File
      $data = array();
      //format the array values
      function add_marker( $lat, $long, $name, $phone, $address, $city, $state, $zip, $url )
      {
      global $data;
  
      $data []= array(
      'Lat' =&gt; $lat,
      'Long' =&gt; $long,
      'Name' =&gt; $name,
      'Phone' =&gt; $phone,
      'Address' =&gt; $address,
      'City' =&gt; $city,
      'State' =&gt; $state,
      'Zip' =&gt; $zip,
      'URL' =&gt; $url 
      );
      }
      // Load the spreadsheet
      $dom = DOMDocument::load( '/home/public/xml/tour.xml' );
      // Select XML tag in the spreadsheet to use
      $rows = $dom-&gt;getElementsByTagName( 'Row' );
      $first_row = true;
      foreach ($rows as $row)
      {
      if ( !$first_row )
      {
      $lat = "";
      $long = "";
      $name = "";
      $phone = "";
      $address = "";
      $city = "";
      $state = "";
      $zip = "";
      $url = "";
  
      $index = 1;
      $cells = $row-&gt;getElementsByTagName( 'Cell' );
      foreach( $cells as $cell )
      { 
      $ind = $cell-&gt;getAttribute( 'Index' );
      if ( $ind != null ) $index = $ind;
  
      if ( $index == 1 ) $lat = $cell-&gt;nodeValue;
      if ( $index == 2 ) $long = $cell-&gt;nodeValue;
      if ( $index == 3 ) $name = $cell-&gt;nodeValue;
      if ( $index == 4 ) $phone = $cell-&gt;nodeValue;
      if ( $index == 5 ) $address = $cell-&gt;nodeValue;
      if ( $index == 6 ) $city = $cell-&gt;nodeValue;
      if ( $index == 7 ) $state = $cell-&gt;nodeValue;
      if ( $index == 8 ) $zip = $cell-&gt;nodeValue;
      if ( $index == 9 ) $url = $cell-&gt;nodeValue;
  
      $index += 1;
      }
      add_marker( $lat, $long, $name, $phone, $address, $city, $state, $zip, $url );
      }
      $first_row = false;
      }
  //
  // Write and save xml file
  //
      //create document
      $doc = new DOMDocument('1.0', 'UTF-8');
      //pretty formatting
      $doc-&gt;formatOutput = true;
  
      //create 'markers' root element
      $root = $doc-&gt;createElement('markers');
      $doc-&gt;appendChild($root);
  
      //run through the array constructed from excel file
      foreach( $data as $row )
      {
          //create individual marker element
          $root_child = $doc-&gt;createElement('marker');
          $root-&gt;appendChild($root_child);
  
          //set attribute of lat
          $root_attr1 = $doc-&gt;createAttribute('lat');
          $root_child-&gt;appendChild($root_attr1);
          //assign 'lat' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Lat']);
          $root_attr1-&gt;appendChild($root_text);
  
          //set attribute of lng
          $root_attr2= $doc-&gt;createAttribute('lng');
          $root_child-&gt;appendChild($root_attr2);
          //assign 'lng' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Long']);
          $root_attr2-&gt;appendChild($root_text);
  
          //set attribute of name
          $root_attr3= $doc-&gt;createAttribute('name');
          $root_child-&gt;appendChild($root_attr3);
          //assign 'name' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Name']);
          $root_attr3-&gt;appendChild($root_text);
  
          //set attribute of phone
          $root_attr4= $doc-&gt;createAttribute('phone');
          $root_child-&gt;appendChild($root_attr4);
          //assign 'phone' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Phone']);
          $root_attr4-&gt;appendChild($root_text);
  
          //set attribute of address
          $root_attr5= $doc-&gt;createAttribute('address');
          $root_child-&gt;appendChild($root_attr5);
          //assign 'address' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Address']);
          $root_attr5-&gt;appendChild($root_text);
  
          //set attribute of city
          $root_attr6= $doc-&gt;createAttribute('city');
          $root_child-&gt;appendChild($root_attr6);
          //assign 'city' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['City']);
          $root_attr6-&gt;appendChild($root_text);
  
          //set attribute of state
          $root_attr7= $doc-&gt;createAttribute('state');
          $root_child-&gt;appendChild($root_attr7);
          //assign 'state' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['State']);
          $root_attr7-&gt;appendChild($root_text);
  
          //set attribute of zip
          $root_attr8= $doc-&gt;createAttribute('zip');
          $root_child-&gt;appendChild($root_attr8);
          //assign 'zip' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['Zip']);
          $root_attr8-&gt;appendChild($root_text);
  
          //set attribute of url
          $root_attr9= $doc-&gt;createAttribute('url');
          $root_child-&gt;appendChild($root_attr9);
          //assign 'name' attribute it's value from array
          $root_text = $doc-&gt;createTextNode($row['URL']);
          $root_attr9-&gt;appendChild($root_text);
      }
  
      $doc-&gt;save("/home/public/xml/markers.xml");//save("/home/public/xml/markers.xml");
  ?&gt;
  </code></pre>
  
  <p>Output of the markers.xml file:
  </p>
  
  <pre><code>&lt;markers&gt;
    &lt;marker lat="Lat" lng="Long" name="Name" phone="Phone" address="Address" city="City" state="State" zip="Zip" url="URL"/&gt;
    &lt;marker lat="39.769831000000003" lng="-104.972657" name="Generic Liquors" phone="555-123-5555" address="42 Walnut St" city="Denver" state="CO" zip="80207" url="URL"/&gt;
    &lt;marker lat="39.763903999999997" lng="-104.966311" name="Fancy Restaurant" phone="555-123-5556" address="55 Colfax Drive" city="Denver" state="CO" zip="80207" url="URL"/&gt;
    &lt;marker lat="39.759087000000001" lng="-104.982963" name="Even Fancier Restaurant" phone="555-123-5557" address="1129 Boggio St" city="Denver" state="CO" zip="87505" url="URL"/&gt;
    &lt;marker lat="39.759087000000001" lng="-104.982963" name="Even Fancier Restaurant" phone="555-123-5557" address="1129 Boggio St" city="Denver" state="CO" zip="87505" url="URL"/&gt;
    &lt;marker lat="39.759087000000001" lng="-104.982963" name="Even Fancier Restaurant" phone="555-123-5557" address="1129 Boggio St" city="Denver" state="CO" zip="87505" url="URL"/&gt;
  &lt;/markers&gt;
  </code></pre>
  
  <p>Lots of extra numbers and extra marker tags in there.  Ideas?</p>