XML file error with Tectonicus 2.25

旧街凉风 提交于 2019-12-02 18:50:06

问题


I'm trying to make a Tectonicus map for my singleplayer world. Therefore I need a XML config file, but when trying to make the map I get this error in Terminal (MAC OSX):

"Parsing config from /Users/ralphvandenheuvel/Downloads
[Fatal Error] :1:1: Content is not allowed in prolog.
org.xml.sax.SAXParseException; systemId: file:/Users/ralphvandenheuvel/Downloads/; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)
    at tectonicus.configuration.XmlConfigurationParser.loadXml(Unknown Source)
    at tectonicus.configuration.XmlConfigurationParser.parseConfiguration(Unknown Source)
    at tectonicus.TectonicusApp.main(Unknown Source)
Exception in thread "main" java.lang.RuntimeException: Couldn't get root config node from /Users/ralphvandenheuvel/Downloads
    at tectonicus.configuration.XmlConfigurationParser.parseConfiguration(Unknown Source)
    at tectonicus.TectonicusApp.main(Unknown Source)"

My file looks like this in Microsoft Word (OSX, 2016):

<?xml version="1.0"?>
<tectonicus version="2">
    <config mode="cmd" outputDir="/Users/ralphvandenheuvel/Downloads"/>
    <map name="GLACIER" worldDir="/Users/ralphvandenheuvel/Library/Application Support/minecraft/saves/GLACIER/level">
        <layer name="Day" lighting="day"/>
    </map>
</tectonicus>

What is the problem? Also I do not know if my xml is 1.0??? For answering, I'm not the best in XML programming, so please, keep the answer simple :)

EDIT: I've tried to locate a BOM, but there is no sign of it (Hex Friend, Emacs; still no sign). I do not know if there could be something else making the code 'false'.

EDIT: I remade the XML with Emacs, and checked for BOM's, which were not there.


回答1:


I believe that your problem is that you are using MS Word to make your XML (MS Word save the file in a incompatible format) ... Make the same XML but using Simple text editor like TextEdit ...



来源:https://stackoverflow.com/questions/48367554/xml-file-error-with-tectonicus-2-25

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!