problem with validation of java-produced xml files (Properties-Class) [message #172978] |
Wed, 05 July 2006 08:46 |
Eclipse User |
|
|
|
Originally posted by: m.fernau.cps-net.de
Hello!
I sometimes use the Properties-Class to save different kinds of
informations. The Properties-Class can save this information into
xml-Files, but this generated xml-File seems to be invalid.
Please have a look at this small example:
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
3 <properties>
4 <entry key="server.host">192.168.0.100</entry>
5 <entry key="truststore.path">/htdocs/2006/jsp/WEB-INF/truststore</entry >
6 </properties>
This is a generated xml-file from Properties-Class. The wtp XML-Validator
now points on two errors in this file. On the fist line I get this
error-message:
Referenced file contains errors (http://java.sun.com/dtd/properties.dtd).
For more information, right click on the message and select "Show
Details..."
and on line 5 I get the following error:
The processing instruction target matching "[xX][mM][lL]" is not allowed.
The last error seems to be very content-independend and thus seems to be a
bug of the validator. If I delete or add some lines in this file, this
error-message goes up and down on other lines regardless of the content.
Well, I can't change this content because Properties will not be able to
load this content again. Is there a way to generally disable the validation
for this XML-File or can I do anything else to get rid of these messages?
Regards,
Martin
|
|
|
Re: problem with validation of java-produced xml files (Properties-Class) [message #173051 is a reply to message #172978] |
Wed, 05 July 2006 13:05 |
Eclipse User |
|
|
|
Originally posted by: born.oio.de
hi martin,
in the archive i've seen an semicolon after the doctype definition:
here's the snipplet from there:
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd";>
3 <properties>
4 <entry key="server.host">192.168.0.100</entry>
5 <entry key="truststore.path">/htdocs/2006/jsp/WEB-INF/truststore</entry >
6 </properties>
i'm not shure, if that's the problem, cause the ; can't be seen in the
newsportal. but if you've got one in your xml, try to remove this.
matze
|
|
|
|
Powered by
FUDForum. Page generated in 0.02004 seconds