From: http://bioinfo.ustc.edu.cn/seagven/?p=769
An error occurred parsing XML in PHP today:
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:
- Error in reading XML file IOException parsing XML document from URL
- Vs2019 + QT parses the XML file and reports an error at doc.setcontent (& file)
- XML tag has empty body less… (Ctrl+F1) Reports empty tag body. The validation works in XML / JSP
- error Newline required at end of file but not found eol-last
- The problem that the content extra data in the notification cannot be updated
- Record the pits you stepped on – NSS error – 5938 (PR_ END_ OF_ FILE_ ERROR), curl: (35) Encountered end of file
- Gcc compiler warning solution: “extra tokens at end of ifndef directive” Tags: GCC, warning
- make modules_ Install compiles the kernel driver as a module, and the location of. Ko file in the root file
- C ා use math.net Read. Mat file, file content is complex
- Golong based tool for automatically generating the corresponding struct file according to XML file
- [ ERROR ] Error loading xmlfile: squeezenet1.1\FP16\squeezenet1.1.xml, File was not found at line: 1
- Error parsing Mapper XML. The XML location is ‘file
- Error in the project tag in the POM file of Maven project: failure to transfer
- R Error: XML content does not seem to be XML: ‘input.xml’
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- Use Python to insert the specified content in the specified line of the specified file
- Windows can’t delete the file, indicating that it is in use. (release of document occupation)
- Solve syntax error: unexpected end of file or /bin/bash^m: bad interpeneter: no match file or directory
- -bash: cannot create temp file for here-document: No space left on device