error reading xml file in mac os java applet
Every once in a while, I get the following exception when trying to read in my XML file. The file looks ok and seems to be valid. Any hints wo开发者_如何学编程uld be appreciated.
I am trying to read the config file in mac os via applet and i get the above error.
java.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException: Premature end of file.
Best regards, SAGAR.
This may help.
You also need to run your XML through a validator. Having a schema would help because Java's XML APIs support the ability to associate a schema with a parser so the parser will automatically validate the document for you.
精彩评论