Wednesday, March 6, 2019

Solution To: "Content is not allowed in trailing section" in XML File




Check if your XML is properly build
<? ?>
<root>
.....

1. Check encoding, if you are using text editor encoding must be same us system encoding. If you use XML editor encoding should set proper encoding of binary data.
2. Check if there is no content between XML declaration (<?xml ?>) and root ie no plain texts. Bad encoding can make parser to treat XML declaration as the text.
3. Try open file in XML editor and validate it.
4. Is the XML empty?

No comments:

Post a Comment