Many developers may prompt Error parsing XML: junk after document element when writing an XML layout file. Here, Android123 reminds everyone that a valid XML file has only one main root node, such as
<android123>
<item1/>
<item2/>
<item3/>
</android123>
If there is an error like Error parsing XML: junk after document element, your idea may be as long as the main root has multiple nodes, for example
<android123>
<item1/>
</android123>
<android123>
<item2/>
<item3/>
</android123>
The xml cannot be parsed. The reason may be that the xml format is written incorrectly. Consider that the root node is incorrect.
Similar Posts:
- linq to xml There are multiple root elements.
- Difference between normalize space (.) and normalize space (text ()) in XPath
- Org.yaml.snakeyaml.parser.ParserException: while parsing a block mapping
- Vue3 vue.draggable slot jsx Error: Error: draggable element must have an item slot
- [Solved] DOM adds elements to HTML Error: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of typ…
- XML(xsd):Failed to read schema document [How to Solve]
- [Solved] DOM Add Element to HTML Error: Failed to execute ‘appendChild’ on ‘Node’: parameter 1 is not of type ‘Node’
- [Solved] Elasticsearch Error: maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
- [Solved] ES Startup Error: maybe these locations are not writable or multiple nodes were started without increasing
- [Solved] XML Read Error: Invalid byte 1 of 1-byte UTF-8 sequence