XML file should have root tag (extra content at the end of the document in file error)

From: http://bioinfo.ustc.edu.cn/seagven/?p=769

An error occurred parsing XML in PHP today:

DOMDocument::load() [domdocument.load]: Extra content at the end of the document in file *****

USES the following XML document

<?xml version="1.0" encoding="UTF-8"?>
  <SearchConstraints>
    <Begin>glucose</Begin>
    <End>Ethanol</End>
    <Interface>name</Interface>
    <IntermediatesInclude number="0"></IntermediatesInclude>
    <IntermediatesExclude> number="0"></IntermediatesExclude>
    <Organisms type="all"></Organisms>
    <KShort>10</KShort>
  </SearchConstraints>
  <StoPList>
    <StoP>
      <Source id="glucose"></Source>
      <Target id="Ethanol"></Target>
      <RouteList>
      </RouteList>
    </StoP>
  </StoPList>

problem:
There’s no tag!
XML files can only have one root tag!

change the XML to the following so that it’s ok, that is
Add a Document tag and put the previous two root tags SearchConstraints and StoPList under the Document tag, so that the entire XML file has only one root tag.

<?xml version="1.0" encoding="UTF-8"?>
<Document>
  <SearchConstraints>
    <Begin>glucose</Begin>
    <End>Ethanol</End>
    <Interface>name</Interface>
    <IntermediatesInclude number="0"></IntermediatesInclude>
    <IntermediatesExclude> number="0"></IntermediatesExclude>
    <Organisms type="all"></Organisms>
    <KShort>10</KShort>
  </SearchConstraints>
  <StoPList>
    <StoP>
      <Source id="glucose"></Source>
      <Target id="Ethanol"></Target>
      <RouteList>
      </RouteList>
    </StoP>
  </StoPList>
</Document>

Read More: