sagngh8 Posted May 4, 2011 Report Share Posted May 4, 2011 Hi: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 would be appreciated.I am trying to read the config file in mac os via applet and i get the above error.The same file while read form windows system works properlyjava.util.InvalidPropertiesFormatException: org.xml.sax.SAXParseException: Premature end of file.Best regards,SAGAR.This is my file syntax.<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"><properties><comment>Configuration File</comment><entry key="x1">y1</entry><entry key="x2">y2</entry><entry key="x3">y3</entry><entry key="x4">y4</entry></properties> Link to comment Share on other sites More sharing options...
Ingolme Posted May 22, 2011 Report Share Posted May 22, 2011 I can only guess that the file wasn't completely loaded for some reason causing the end tag to be mising. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now