title: SAXException: Content is not allowed in trailing section
body: <p>This is driving me crazy. I have used this bit of code for lots of different projects but this is the first time it's given me this type of error. This is the whole XML file:</p>
  
  <pre><code>  &lt;layers&gt;
      &lt;layer name="Layer 1" h="400" w="272" z="0" y="98" x="268"/&gt;
      &lt;layer name="Layer 0" h="355" w="600" z="0" y="287" x="631"/&gt;
    &lt;/layers&gt;
  </code></pre>
  
  <p>Here is the operative bit of code in my homebrew Xml class which uses the DocumentBuilderFactory to parse the Xml fed into it:</p>
  
  <pre><code>public static Xml parse(String xmlString)
      {
          DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
          dbf.setNamespaceAware(true);
          Document doc = null;
          //System.out.print(xmlString);
          try
          {
              doc = dbf.newDocumentBuilder().parse(
                      new InputSource(new StringReader(xmlString)));
              // Get root element...
              Node rootNode = (Element) doc.getDocumentElement();
              return getXmlFromNode(rootNode);
          } catch (ParserConfigurationException e)
          {
              System.out.println("ParserConfigurationException in Xml.parse");
              e.printStackTrace();
          } catch (SAXException e)
          {
              System.out.println("SAXException in Xml.parse ");
              e.printStackTrace();
          } catch (IOException e)
          {
              System.out.println("IOException in Xml.parse");
              e.printStackTrace();
          }
          return null;
      }
  </code></pre>
  
  <p>The context that I am using it is: school project to produce a Photoshop type image manipulation application. The file is being saved with the layers as .png and this xml file for the position, etc. of the layers in a .zip file. I don't know if the zipping is adding some mysterious extra characters or not.</p>
  
  <p>I appreciate your feedback.</p>