title: How to solve - The element type meta must be terminated by the matching end-tag </meta>
body: <p>I tried to wrote a code for weather app and i have this error:</p>
  
  <blockquote>
    <p>org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 27; The element type "meta" must be terminated by the matching end-tag "".
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1239)
    at main.Weather.GoogleWeather.getWeather(GoogleWeather.java:38)
    at main.Main.main(Main.java:12)</p>
  </blockquote>
  
  <p>I don't know if I set everything properly</p>
  
  <p>My Code:</p>
  
  <pre><code>public class GoogleWeather extends Weather{
      private final String googleWeatherURL = "http://www.google.com/ig/api?weather=";
      public GoogleWeather(String city, String locationPoints) throws IOException, SAXException {
          super(city, locationPoints);
      }
  
      @Override
      public void getWeather() {
          String location = "Warsaw, PL";
          String link = googleWeatherURL + location;
          link = link.replace(" ", "%20");
  
          try {
              URL urlObject = new URL(link);
              InputStream in = urlObject.openStream();
              XMLReader xmlReader = XMLReaderFactory.createXMLReader();
  
              XMLHandler xmlHandler = new XMLHandler();
              xmlReader.setContentHandler((ContentHandler) xmlHandler);
  
              InputSource inSource = new InputSource(in);
  
              xmlReader.parse(inSource);
  
          } catch (IOException ioe) {
              ioe.printStackTrace();
          } catch (SAXException se) {
              se.printStackTrace();
          }
  </code></pre>
  
  <p>And</p>
  
  <pre><code>public class XMLHandler extends DefaultHandler {
      private ArrayList&lt;Integer&gt; night = new ArrayList&lt;Integer&gt;();
      private ArrayList&lt;Integer&gt; day = new ArrayList&lt;Integer&gt;();
      private ArrayList&lt;String&gt; days = new ArrayList&lt;String&gt;();
      private ArrayList&lt;String&gt; conditions = new ArrayList&lt;String&gt;();
  
  
      public XMLHandler() {
          super();
      }
  
      @Override
      public void startDocument() {
          System.out.println("Start document");
      }
  
  
      @Override
      public void endDocument() {
          System.out.println("End document");
      }
  
  
      @Override
      public void startElement(String uri, String name, String qName, Attributes atts) {
          if (qName.compareTo("day_of_week") == 0) {
              String day = atts.getValue(0);
              System.out.println("Day: " + day+ " ; ");
              this.days.add(day);
          }
          if (qName.compareToIgnoreCase("low") == 0) {
              int night = Integer.parseInt(atts.getValue(0));
              System.out.print("Low: " + night + " ; ");
              this.night.add(night);
          }
          if (qName.compareToIgnoreCase("high") == 0) {
              int high = Integer.parseInt(atts.getValue(0));
              System.out.print("High: " + high + " ; ");
              this.day.add(high);
          }
          if (qName.compareToIgnoreCase("condition data") == 0) {
              String conditions = atts.getValue(0);
              System.out.print("Conditions: " + conditions + " ; ");
              this.conditions.add(conditions);
          }
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>